Current File : /home/jeconsul/public_html/wp-content/plugins/suremails/build/admin-notice.js |
/*! For license information please see admin-notice.js.LICENSE.txt */
(()=>{"use strict";var e,t,n={1020:(e,t,n)=>{var r=n(1609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:s.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},4848:(e,t,n)=>{e.exports=n(1020)},1609:e=>{e.exports=window.React}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={exports:{}};return n[e](i,i.exports,o),i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var i=Object.create(null);o.r(i);var a={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>a[e]=()=>n[e]));return a.default=()=>n,o.d(i,a),i},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};const i=window.wp.element,a=window.wp.domReady;var s=o.n(a);function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(null,arguments)}const c=e=>React.createElement("svg",l({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),React.createElement("path",{d:"M23.25 0H0.75C0.335787 0 0 0.335787 0 0.75V23.25C0 23.6642 0.335787 24 0.75 24H23.25C23.6642 24 24 23.6642 24 23.25V0.75C24 0.335787 23.6642 0 23.25 0Z",fill:"#0D7EE8"}),React.createElement("path",{d:"M6.40292 11.6635C6.61165 11.8145 6.90801 11.7649 7.04455 11.5618C7.19552 11.3531 7.14591 11.0567 6.94285 10.9202L4.93281 9.48016C4.86137 9.42507 4.8676 9.35611 4.87071 9.32164C4.87386 9.28718 4.90015 9.22703 4.98662 9.19317L18.3609 5.78333C18.4386 5.76953 18.4844 5.80148 18.5157 5.83906C18.547 5.87667 18.5784 5.91424 18.5433 5.99446L13.476 18.8162C13.4409 18.8964 13.3776 18.9045 13.3488 18.9158C13.3143 18.9127 13.2454 18.9065 13.2028 18.8401L11.6711 16.0326C11.6228 15.9518 11.5833 15.8509 11.535 15.7701C10.9355 14.4093 10.7842 13.4051 11.9093 12.416L14.806 9.73531C15.0027 9.55853 15.0221 9.26839 14.8509 9.08611C14.6742 8.88942 14.384 8.87007 14.2017 9.04118L11.1593 11.6635C9.62635 13.0119 9.88161 14.6891 10.8516 16.4865L12.3833 19.294C12.5789 19.6661 12.9769 19.8759 13.4023 19.8589C13.5145 19.8482 13.6354 19.8175 13.7363 19.778C14.0101 19.6707 14.2244 19.4538 14.3471 19.1731L19.4144 6.35138C19.5666 5.97597 19.495 5.53861 19.2242 5.22916C18.9534 4.91967 18.5405 4.79884 18.1432 4.88794L4.7545 8.30341C4.34849 8.41257 4.04151 8.73226 3.95519 9.14836C3.86882 9.56446 4.04691 9.97673 4.39289 10.2235L6.40292 11.6635Z",fill:"white"}),React.createElement("path",{d:"M5.76973 15.5256C5.80738 15.5108 5.85264 15.4786 5.88538 15.4513L7.90981 13.6745C8.08107 13.5206 8.09791 13.268 7.94892 13.1093C7.79502 12.9381 7.54246 12.9212 7.38376 13.0702L5.35929 14.847C5.18806 15.0009 5.17123 15.2535 5.32018 15.4122C5.43425 15.5557 5.60664 15.5894 5.76973 15.5256Z",fill:"white"}),React.createElement("path",{d:"M5.51088 18.3676C5.54857 18.353 5.59394 18.321 5.62672 18.2938L9.0673 15.2807C9.23898 15.1273 9.25653 14.8748 9.10799 14.7156C8.95458 14.544 8.70205 14.5264 8.54294 14.6749L5.10235 17.688C4.93068 17.8414 4.91313 18.0939 5.06167 18.253C5.17045 18.3843 5.36017 18.4262 5.51088 18.3676Z",fill:"white"}));var u=o(4848),f=o(1609),d=o.t(f,2);const p=window.ReactDOM;var h=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var y=Object.defineProperty,g=e=>{throw TypeError(e)},v=(e,t,n)=>((e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),b=(e,t,n)=>t.has(e)||g("Cannot "+n),x=(e,t,n)=>(b(e,t,"read from private field"),n?n.call(e):t.get(e)),w=(e,t,n)=>t.has(e)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_=(e,t,n,r)=>(b(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);const S=e=>{const t=E(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),O(n,t)||j(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},O=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),i=o?O(e.slice(1),o):void 0;if(i)return i;if(0===t.validators.length)return;const a=e.join("-");return null==(n=t.validators.find((({validator:e})=>e(a))))?void 0:n.classGroupId},k=/^\[(.+)\]$/,j=e=>{if(k.test(e)){const t=k.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},E=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return A(Object.entries(e.classGroups),n).forEach((([e,n])=>{P(n,r,e,t)})),r},P=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return T(e)?void P(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{P(o,C(t,e),n,r)}))}else(""===e?t:C(t,e)).classGroupId=n}))},C=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},T=e=>e.isThemeGetter,A=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,M=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},N=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,a=e=>{const n=[];let a,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){a=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:a&&a>l?a-l:void 0}};return n?e=>n({className:e,parseClassName:a}):a},D=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},I=/\s+/;function R(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=L(e))&&(r&&(r+=" "),r+=t);return r}const L=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=L(e[r]))&&(n&&(n+=" "),n+=t);return n};function z(e,...t){let n,r,o,i=function(s){const l=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:M(e.cacheSize),parseClassName:N(e),...S(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)};function a(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],a=e.trim().split(I);let s="";for(let e=a.length-1;e>=0;e-=1){const t=a[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:f}=n(t);let d=!!f,p=r(d?u.substring(0,f):u);if(!p){if(!d){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}d=!1}const h=D(l).join(":"),m=c?h+"!":h,y=m+p;if(i.includes(y))continue;i.push(y);const g=o(p,d);for(let e=0;e<g.length;++e){const t=g[e];i.push(m+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,i),i}return function(){return i(R.apply(null,arguments))}}const B=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},F=/^\[(?:([a-z-]+):)?(.+)\]$/i,W=/^\d+\/\d+$/,V=new Set(["px","full","screen"]),$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,U=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,K=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,q=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Y=e=>G(e)||V.has(e)||W.test(e),X=e=>ce(e,"length",ue),G=e=>!!e&&!Number.isNaN(Number(e)),Z=e=>ce(e,"number",G),J=e=>!!e&&Number.isInteger(Number(e)),Q=e=>e.endsWith("%")&&G(e.slice(0,-1)),ee=e=>F.test(e),te=e=>$.test(e),ne=new Set(["length","size","percentage"]),re=e=>ce(e,ne,fe),oe=e=>ce(e,"position",fe),ie=new Set(["image","url"]),ae=e=>ce(e,ie,pe),se=e=>ce(e,"",de),le=()=>!0,ce=(e,t,n)=>{const r=F.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ue=e=>U.test(e)&&!K.test(e),fe=()=>!1,de=e=>q.test(e),pe=e=>H.test(e),he=()=>{const e=B("colors"),t=B("spacing"),n=B("blur"),r=B("brightness"),o=B("borderColor"),i=B("borderRadius"),a=B("borderSpacing"),s=B("borderWidth"),l=B("contrast"),c=B("grayscale"),u=B("hueRotate"),f=B("invert"),d=B("gap"),p=B("gradientColorStops"),h=B("gradientColorStopPositions"),m=B("inset"),y=B("margin"),g=B("opacity"),v=B("padding"),b=B("saturate"),x=B("scale"),w=B("sepia"),_=B("skew"),S=B("space"),O=B("translate"),k=()=>["auto",ee,t],j=()=>[ee,t],E=()=>["",Y,X],P=()=>["auto",G,ee],C=()=>["","0",ee],T=()=>[G,ee];return{cacheSize:500,separator:":",theme:{colors:[le],spacing:[Y,X],blur:["none","",te,ee],brightness:T(),borderColor:[e],borderRadius:["none","","full",te,ee],borderSpacing:j(),borderWidth:E(),contrast:T(),grayscale:C(),hueRotate:T(),invert:C(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[Q,X],inset:k(),margin:k(),opacity:T(),padding:j(),saturate:T(),scale:T(),sepia:C(),skew:T(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[te]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",ee]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",J,ee]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",J,ee]}],"grid-cols":[{"grid-cols":[le]}],"col-start-end":[{col:["auto",{span:["full",J,ee]},ee]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[le]}],"row-start-end":[{row:["auto",{span:[J,ee]},ee]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[te]},te]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",te,X]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Z]}],"font-family":[{font:[le]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ee]}],"line-clamp":[{"line-clamp":["none",G,Z]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Y,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Y,X]}],"underline-offset":[{"underline-offset":["auto",Y,ee]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",oe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",re]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ae]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Y,ee]}],"outline-w":[{outline:[Y,X]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:E()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Y,X]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",te,se]}],"shadow-color":[{shadow:[le]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",te,ee]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ee]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[J,ee]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ee]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Y,X,Z]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},me=z(he);function ye(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ye(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ge(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ye(e))&&(r&&(r+=" "),r+=t);return r}const ve=(...e)=>me(ge(...e)),be=(...e)=>(...t)=>e.forEach((e=>null==e?void 0:e(...t))),xe=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},we={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},_e=(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},Se=e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return console.error(e),null}},Oe=(0,f.forwardRef)(((e,t)=>{const{variant:n="primary",size:r="md",type:o="button",tag:i="button",className:a,children:s,disabled:l=!1,destructive:c=!1,icon:d=null,iconPosition:p="left",loading:h=!1,...m}=e,y=h?"opacity-50 disabled:cursor-not-allowed":"",g={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],v=c&&!l?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",b={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[r];let x,w=null,_="";return d&&(_="flex items-center justify-center","left"===p?x=d:w=d),(0,u.jsxs)(i,{ref:t,type:o,className:ve(_,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",b,g,v,y,{"cursor-default":l},a),disabled:l,...m,children:[(0,u.jsx)(f.Fragment,{children:x},"left-icon"),s?(0,u.jsx)("span",{className:"px-1",children:s}):null,(0,u.jsx)(f.Fragment,{children:w},"right-icon")]})}));Oe.displayName="Button";let ke=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const je=(0,f.forwardRef)((({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:i=!1,...a},s)=>{const l={neutral:"",help:"font-normal",error:"font-normal",disabled:""};if(!e)return null;let c="";return i&&(c="after:content-['*'] after:text-field-required after:ml-0.5"),(0,u.jsx)(t,{ref:s,className:ve("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[o],c,null==l?void 0:l[o],r),...a,children:e})}));je.displayName="Label";const Ee=({label:e,switchId:t,disabled:n=!1,children:r,size:o})=>{const i={sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},a={sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},s={sm:"space-y-0.5",md:"space-y-1"};if((0,f.isValidElement)(e))return(0,u.jsxs)("div",{className:ve("inline-flex items-center gap-3","items-start"),children:[r,e]});const l=!(null!=e&&e.heading||null!=e&&e.description),c=null!=e&&e.heading&&null!=e&&e.description?"items-start":"items-center";return l?r:(0,u.jsxs)("div",{className:ve("inline-flex",c,"gap-3"),children:[r,(()=>{const{heading:r="",description:l=""}=e||{};return(0,u.jsxs)("div",{className:ve("space-y-0.5",s[o]),children:[r&&(0,u.jsx)(je,{htmlFor:t,className:ve("m-0",i[o]),...n&&{variant:"disabled"},children:r}),l&&(0,u.jsx)(je,{tag:"p",variant:"help",className:ve("text-sm font-normal leading-5 m-0",a[o]),...n&&{variant:"disabled"},children:l})]})})()]})},Pe=(0,f.forwardRef)((({id:e,onChange:t,value:n,defaultValue:r=!1,size:o="sm",disabled:i=!1,label:a={heading:"",description:""},name:s,className:l,...c},d)=>{const p="lg"===o?"md":o,h=(0,f.useMemo)((()=>typeof n<"u"),[n]),m=(0,f.useMemo)((()=>e||`switch-${ke()}`),[]),[y,g]=(0,f.useState)(r),v="primary",b=(0,f.useCallback)((()=>h?n:y),[h,n,y]),x={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},w={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"}};return(0,u.jsx)(Ee,{label:a,switchId:m,disabled:i,size:p,children:(0,u.jsxs)("div",{className:ve("relative group/switch inline-block cursor-pointer rounded-full shrink-0",w[p].container,l),children:[(0,u.jsx)("input",{ref:d,id:m,type:"checkbox",className:ve("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",x[v].input,i&&"bg-toggle-off-disabled disabled:border-transparent shadow-none disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled",!i&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[v].input),checked:b(),onChange:e=>{if(i)return;const n=e.target.checked;h||g(n),"function"==typeof t&&t(n)},disabled:i,name:s,...c}),(0,u.jsx)("label",{htmlFor:m,className:ve("peer/toggle-dial bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 left-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 before:left-2/4 before:-translate-y-2/4 before:-translate-x-2/4",w[p].toggleDial,x[v].toggleDial,i&&"peer-disabled:cursor-not-allowed",!i&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 group-focus-within/switch:left-0.5 group-hover/switch:left-0.5"}[p])})]})})}));Pe.displayName="Switch";const Ce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Te=(...e)=>e.filter(((e,t,n)=>!!e&&n.indexOf(e)===t)).join(" ");var Ae={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Me=(0,f.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>(0,f.createElement)("svg",{ref:l,...Ae,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Te("lucide",o),...s},[...a.map((([e,t])=>(0,f.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),Ne=(e,t)=>{const n=(0,f.forwardRef)((({className:n,...r},o)=>(0,f.createElement)(Me,{ref:o,iconNode:t,className:Te(`lucide-${Ce(e)}`,n),...r})));return n.displayName=`${e}`,n},De=Ne("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Ie=Ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Re=Ne("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Le=Ne("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),ze=Ne("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Be=(Ne("CloudUpload",[["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"M12 12v9",key:"192myk"}],["path",{d:"m16 16-4-4-4 4",key:"119tzi"}]]),Ne("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])),Fe=(Ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]),Ne("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]),Ne("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]])),We=Ne("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Ve=Ne("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),$e=Ne("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),Ue=Ne("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),Ke=Ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),qe=Ne("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),He=Ne("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Ye=(Ne("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]]),Ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])),Xe=Ne("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),Ge=Ne("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ze=Ne("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Je=(0,f.forwardRef)((({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:o,indeterminate:i,disabled:a,size:s="md",className:l,...c},d)=>{var p,h;const m=(0,f.useMemo)((()=>e||`checkbox-${ke()}`),[e]),y=(0,f.useMemo)((()=>typeof r<"u"),[r]),[g,v]=(0,f.useState)(n||!1),b="primary",x={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},w={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},_=(0,f.useCallback)((()=>y?r:g),[y,r,g]),S=(0,f.useCallback)((()=>(0,f.isValidElement)(t)?t:null!=t&&t.heading||null!=t&&t.description?(0,u.jsxs)("div",{className:x[s].gap,children:[(null==t?void 0:t.heading)&&(0,u.jsx)(je,{className:ve("text-text-primary font-medium leading-4 m-0",x[s].text,x[s].gap,a&&"text-text-disabled"),htmlFor:m,children:null==t?void 0:t.heading}),(null==t?void 0:t.description)&&(0,u.jsx)(je,{tag:"p",className:ve("font-normal leading-5 m-0",x[s].description,a&&"text-text-disabled"),variant:"help",children:null==t?void 0:t.description})]}):null),[t,s,a]);return(0,u.jsxs)("div",{className:ve("inline-flex items-center justify-center gap-2",!!t&&"items-start",a&&"cursor-not-allowed"),children:[(0,u.jsxs)("label",{className:ve("relative flex items-center justify-center rounded-full p-0.5",!a&&"cursor-pointer"),htmlFor:m,children:[(0,u.jsx)("input",{ref:d,id:m,type:"checkbox",className:ve("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",w[b].checkbox,x[s].checkbox,a&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",l),checked:_(),onChange:e=>{if(a)return;const t=e.target.checked;y||v(t),"function"==typeof o&&o(t)},disabled:a,...c}),(0,u.jsx)("span",{className:ve("pointer-events-none inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",w[b].icon,a&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:i?(0,u.jsx)(Ve,{className:ve(null==(p=x[s])?void 0:p.icon)}):(0,u.jsx)(De,{className:ve(null==(h=x[s])?void 0:h.icon)})})]}),!!t&&S()]})}));Je.displayName="Checkbox";const Qe={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},et={sm:"text-sm leading-5",md:"text-base leading-6"},tt={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},nt={sm:{switch:"mt-1",radio:"mt-0.5"},md:{switch:"mt-0.5",radio:"mt-px"}},rt={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"};function ot(){return typeof window<"u"}function it(e){return lt(e)?(e.nodeName||"").toLowerCase():"#document"}function at(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function st(e){var t;return null==(t=(lt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function lt(e){return!!ot()&&(e instanceof Node||e instanceof at(e).Node)}function ct(e){return!!ot()&&(e instanceof Element||e instanceof at(e).Element)}function ut(e){return!!ot()&&(e instanceof HTMLElement||e instanceof at(e).HTMLElement)}function ft(e){return!(!ot()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof at(e).ShadowRoot)}function dt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function pt(e){return["table","td","th"].includes(it(e))}function ht(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function mt(e){const t=yt(),n=ct(e)?vt(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function yt(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function gt(e){return["html","body","#document"].includes(it(e))}function vt(e){return at(e).getComputedStyle(e)}function bt(e){return ct(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if("html"===it(e))return e;const t=e.assignedSlot||e.parentNode||ft(e)&&e.host||st(e);return ft(t)?t.host:t}function wt(e){const t=xt(e);return gt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ut(t)&&dt(t)?t:wt(t)}function _t(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=wt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=at(o);if(i){const e=St(a);return t.concat(a,a.visualViewport||[],dt(o)?o:[],e&&n?_t(e):[])}return t.concat(o,_t(o,[],n))}function St(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ot(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function kt(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&ft(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function jt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Et(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function Pt(e){return!(0!==e.mozInputSource||!e.isTrusted)||(At()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Ct(e){return!Et().includes("jsdom/")&&(!At()&&0===e.width&&0===e.height||At()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Tt(){return/apple/i.test(navigator.vendor)}function At(){const e=/android/i;return e.test(jt())||e.test(Et())}function Mt(){return jt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Nt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Dt(e){return(null==e?void 0:e.ownerDocument)||document}function It(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Rt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Lt(e){return ut(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function zt(e){e.preventDefault(),e.stopPropagation()}function Bt(e){return!!e&&"combobox"===e.getAttribute("role")&&Lt(e)}const Ft=Math.min,Wt=Math.max,Vt=Math.round,$t=Math.floor,Ut=e=>({x:e,y:e}),Kt={left:"right",right:"left",bottom:"top",top:"bottom"},qt={start:"end",end:"start"};function Ht(e,t,n){return Wt(e,Ft(t,n))}function Yt(e,t){return"function"==typeof e?e(t):e}function Xt(e){return e.split("-")[0]}function Gt(e){return e.split("-")[1]}function Zt(e){return"x"===e?"y":"x"}function Jt(e){return"y"===e?"height":"width"}function Qt(e){return["top","bottom"].includes(Xt(e))?"y":"x"}function en(e){return Zt(Qt(e))}function tn(e){return e.replace(/start|end/g,(e=>qt[e]))}function nn(e){return e.replace(/left|right|bottom|top/g,(e=>Kt[e]))}function rn(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function on(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var an=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),sn=typeof Element>"u",ln=sn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,cn=!sn&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},un=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},fn=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!un(a,!1))if("SLOT"===a.tagName){var s=a.assignedElements(),l=e(s.length?s:a.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{ln.call(a,an)&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var c=a.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(a),u=!un(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(c&&u){var f=e(!0===c?a.children:c.children,!0,r);r.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},dn=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},pn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!dn(e)?0:e.tabIndex},hn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},mn=function(e){return"INPUT"===e.tagName},yn=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},gn=function(e,t){return!(t.disabled||un(t)||function(e){return mn(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ln.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ln.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return yn(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=cn(e);if(a&&!a.shadowRoot&&!0===r(a))return yn(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&cn(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=cn(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ln.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},vn=function(e,t){return!(function(e){return function(e){return mn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||cn(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if(typeof window<"u"&&typeof window.CSS<"u"&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||pn(t)<0||!gn(e,t))},bn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},xn=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,a=i?t.scopeParent:t,s=function(e,t){var n=pn(e);return n<0&&t&&!dn(e)?0:n}(a,i),l=i?e(t.candidates):a;0===s?i?n.push.apply(n,l):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:l})})),r.sort(hn).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},wn=function(e,t){var n;return n=(t=t||{}).getShadowRoot?fn([e],t.includeContainer,{filter:vn.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:bn}):function(e,t,n){if(un(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(an));return t&&ln.call(e,an)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,vn.bind(null,t)),xn(n)};function _n(e,t,n){let{reference:r,floating:o}=e;const i=Qt(t),a=en(t),s=Jt(a),l=Xt(t),c="y"===i,u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-o.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Gt(t)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function Sn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Yt(t,e),h=rn(p),m=s[d?"floating"===f?"reference":"floating":f],y=on(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g="floating"===f?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},x=on(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:l}):g);return{top:(y.top-x.top+h.top)/b.y,bottom:(x.bottom-y.bottom+h.bottom)/b.y,left:(y.left-x.left+h.left)/b.x,right:(x.right-y.right+h.right)/b.x}}function On(e){const t=vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ut(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Vt(n)!==i||Vt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function kn(e){return ct(e)?e:e.contextElement}function jn(e){const t=kn(e);if(!ut(t))return Ut(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=On(t);let a=(i?Vt(n.width):n.width)/r,s=(i?Vt(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const En=Ut(0);function Pn(e){const t=at(e);return yt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:En}function Cn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=kn(e);let a=Ut(1);t&&(r?ct(r)&&(a=jn(r)):a=jn(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==at(e))&&t}(i,n,r)?Pn(i):Ut(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const e=at(i),t=r&&ct(r)?at(r):r;let n=e,o=St(n);for(;o&&r&&t!==n;){const e=jn(o),t=o.getBoundingClientRect(),r=vt(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,f*=e.y,l+=i,c+=a,n=at(o),o=St(n)}}return on({width:u,height:f,x:l,y:c})}function Tn(e,t){const n=bt(e).scrollLeft;return t?t.left+n:Cn(st(e)).left+n}function An(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Tn(e,r)),y:r.top+t.scrollTop}}function Mn(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=at(e),r=st(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=yt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=st(e),n=bt(e),r=e.ownerDocument.body,o=Wt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Wt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Tn(e);const s=-n.scrollTop;return"rtl"===vt(r).direction&&(a+=Wt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(st(e));else if(ct(t))r=function(e,t){const n=Cn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ut(e)?jn(e):Ut(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Pn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return on(r)}function Nn(e,t){const n=xt(e);return!(n===t||!ct(n)||gt(n))&&("fixed"===vt(n).position||Nn(n,t))}function Dn(e,t){const n=t.get(e);if(n)return n;let r=_t(e,[],!1).filter((e=>ct(e)&&"body"!==it(e))),o=null;const i="fixed"===vt(e).position;let a=i?xt(e):e;for(;ct(a)&&!gt(a);){const t=vt(a),n=mt(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||dt(a)&&!n&&Nn(e,a))?r=r.filter((e=>e!==a)):o=t,a=xt(a)}return t.set(e,r),r}function In(e,t,n){const r=ut(t),o=st(t),i="fixed"===n,a=Cn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Ut(0);if(r||!r&&!i)if(("body"!==it(t)||dt(o))&&(s=bt(t)),r){const e=Cn(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Tn(o));const c=!o||r||i?Ut(0):An(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Rn(e){return"static"===vt(e).position}function Ln(e,t){if(!ut(e)||"fixed"===vt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return st(e)===n&&(n=n.ownerDocument.body),n}function zn(e,t){const n=at(e);if(ht(e))return n;if(!ut(e)){let t=xt(e);for(;t&&!gt(t);){if(ct(t)&&!Rn(t))return t;t=xt(t)}return n}let r=Ln(e,t);for(;r&&pt(r)&&Rn(r);)r=Ln(r,t);return r&>(r)&&Rn(r)&&!mt(r)?n:r||function(e){let t=xt(e);for(;ut(t)&&!gt(t);){if(mt(t))return t;if(ht(t))return null;t=xt(t)}return null}(e)||n}const Bn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=st(r),s=!!t&&ht(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Ut(1);const u=Ut(0),f=ut(r);if((f||!f&&!i)&&(("body"!==it(r)||dt(a))&&(l=bt(r)),ut(r))){const e=Cn(r);c=jn(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const d=!a||f||i?Ut(0):An(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:st,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?ht(t)?[]:Dn(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=Mn(t,n,o);return e.top=Wt(r.top,e.top),e.right=Ft(r.right,e.right),e.bottom=Ft(r.bottom,e.bottom),e.left=Wt(r.left,e.left),e}),Mn(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:zn,getElementRects:async function(e){const t=this.getOffsetParent||zn,n=this.getDimensions,r=await n(e.floating);return{reference:In(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=On(e);return{width:t,height:n}},getScale:jn,isElement:ct,isRTL:function(e){return"rtl"===vt(e).direction}};function Fn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=kn(e),u=o||i?[...c?_t(c):[],..._t(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const f=c&&s?function(e,t){let n,r=null;const o=st(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p={rootMargin:-$t(u)+"px "+-$t(o.clientWidth-(c+f))+"px "+-$t(o.clientHeight-(u+d))+"px "+-$t(c)+"px",threshold:Wt(0,Ft(1,l))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==l){if(!h)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}h=!1}try{r=new IntersectionObserver(m,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),i}(c,n):null;let d=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),c&&!l&&p.observe(c),p.observe(t));let h,m=l?Cn(e):null;return l&&function t(){const r=Cn(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==f||f(),null==(e=p)||e.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const Wn=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Xt(n),s=Gt(n),l="y"===Qt(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Yt(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Vn=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Yt(e,t),c={x:n,y:r},u=await Sn(t,l),f=Qt(Xt(o)),d=Zt(f);let p=c[d],h=c[f];if(i){const e="y"===d?"bottom":"right";p=Ht(p+u["y"===d?"top":"left"],p,p-u[e])}if(a){const e="y"===f?"bottom":"right";h=Ht(h+u["y"===f?"top":"left"],h,h-u[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:i,[f]:a}}}}}},$n=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=Yt(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=Xt(o),v=Qt(s),b=Xt(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=d||(b||!m?[nn(s)]:function(e){const t=nn(e);return[tn(e),t,tn(t)]}(s)),_="none"!==h;!d&&_&&w.push(...function(e,t,n,r){const o=Gt(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Xt(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(tn)))),i}(s,m,h,x));const S=[s,...w],O=await Sn(t,y),k=[];let j=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(O[g]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=Gt(e),o=en(e),i=Jt(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=nn(a)),[a,nn(a)]}(o,a,x);k.push(O[e[0]],O[e[1]])}if(j=[...j,{placement:o,overflows:k}],!k.every((e=>e<=0))){var E,P;const e=((null==(E=i.flip)?void 0:E.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(P=j.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var C;const e=null==(C=j.filter((e=>{if(_){const t=Qt(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Un=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Yt(e,t),u=await Sn(t,c),f=Xt(o),d=Gt(o),p="y"===Qt(o),{width:h,height:m}=i.floating;let y,g;"top"===f||"bottom"===f?(y=f,g=d===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,y="end"===d?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,x=Ft(m-u[y],v),w=Ft(h-u[g],b),_=!t.middlewareData.shift;let S=x,O=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(O=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),_&&!d){const e=Wt(u.left,0),t=Wt(u.right,0),n=Wt(u.top,0),r=Wt(u.bottom,0);p?O=h-2*(0!==e||0!==t?e+t:Wt(u.left,u.right)):S=m-2*(0!==n||0!==r?n+r:Wt(u.top,u.bottom))}await l({...t,availableWidth:O,availableHeight:S});const k=await a.getDimensions(s.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}},Kn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Yt(e,t)||{};if(null==c)return{};const f=rn(u),d={x:n,y:r},p=en(o),h=Jt(p),m=await a.getDimensions(c),y="y"===p,g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",x=i.reference[h]+i.reference[p]-d[p]-i.floating[h],w=d[p]-i.reference[p],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let S=_?_[b]:0;(!S||!await(null==a.isElement?void 0:a.isElement(_)))&&(S=s.floating[b]||i.floating[h]);const O=x/2-w/2,k=S/2-m[h]/2-1,j=Ft(f[g],k),E=Ft(f[v],k),P=j,C=S-m[h]-E,T=S/2-m[h]/2+O,A=Ht(P,T,C),M=!l.arrow&&null!=Gt(o)&&T!==A&&i.reference[h]/2-(T<P?j:E)-m[h]/2<0,N=M?T<P?T-P:T-C:0;return{[p]:d[p]+N,data:{[p]:A,centerOffset:T-A-N,...M&&{alignmentOffset:N}},reset:M}}});var qn=typeof document<"u"?f.useLayoutEffect:f.useEffect;function Hn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Hn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Hn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Yn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xn(e,t){const n=Yn(e);return Math.round(t*n)/n}function Gn(e){const t=f.useRef(e);return qn((()=>{t.current=e})),t}const Zn=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?Kn({element:n.current,padding:r}).fn(t):{}:n?Kn({element:n,padding:r}).fn(t):{}}}),Jn=(e,t)=>({...Wn(e),options:[e,t]}),Qn=(e,t)=>({...Vn(e),options:[e,t]}),er=(e,t)=>({...$n(e),options:[e,t]}),tr=(e,t)=>({...Un(e),options:[e,t]}),nr=(e,t)=>({...Zn(e),options:[e,t]}),rr={...d},or=rr.useInsertionEffect||(e=>e());function ir(e){const t=f.useRef((()=>{}));return or((()=>{t.current=e})),f.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}const ar="ArrowUp",sr="ArrowDown",lr="ArrowLeft",cr="ArrowRight";function ur(e,t,n){return Math.floor(e/t)!==n}function fr(e,t){return t<0||t>=e.current.length}function dr(e,t){return hr(e,{disabledIndices:t})}function pr(e,t){return hr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function hr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=void 0===t?{}:t;const a=e.current;let s=n;do{s+=r?-i:i}while(s>=0&&s<=a.length-1&&gr(a,s,o));return s}function mr(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e)}}function yr(e,t){return t.flatMap(((t,n)=>e.includes(t)?[n]:[]))}function gr(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var vr=typeof document<"u"?f.useLayoutEffect:f.useEffect;function br(){return br=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},br.apply(this,arguments)}let xr=!1,wr=0;const _r=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+wr++,Sr=rr.useId||function(){const[e,t]=f.useState((()=>xr?_r():void 0));return vr((()=>{null==e&&t(_r())}),[]),f.useEffect((()=>{xr=!0}),[]),e},Or=f.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:i}},width:a=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:p,style:{transform:h,...m}={},...y}=e,g=Sr(),[v,b]=f.useState(!1);if(vr((()=>{r&&"rtl"===vt(r).direction&&b(!0)}),[r]),!r)return null;const[x,w]=n.split("-"),_="top"===x||"bottom"===x;let S=u;(_&&null!=i&&i.x||!_&&null!=i&&i.y)&&(S=null);const O=2*c,k=O/2,j=a/2*(l/-8+1),E=s/2*l/4,P=!!p,C=S&&"end"===w?"bottom":"top";let T=S&&"end"===w?"right":"left";S&&v&&(T="end"===w?"left":"right");const A=null!=(null==o?void 0:o.x)?S||o.x:"",M=null!=(null==o?void 0:o.y)?S||o.y:"",N=p||"M0,0 H"+a+" L"+(a-j)+","+(s-E)+" Q"+a/2+","+s+" "+j+","+(s-E)+" Z",D={top:P?"rotate(180deg)":"",left:P?"rotate(90deg)":"rotate(-90deg)",bottom:P?"":"rotate(180deg)",right:P?"rotate(-90deg)":"rotate(90deg)"}[x];return f.createElement("svg",br({},y,{"aria-hidden":!0,ref:t,width:P?a:a+O,height:a,viewBox:"0 0 "+a+" "+(s>a?s:a),style:{position:"absolute",pointerEvents:"none",[T]:A,[C]:M,[x]:_||P?"100%":"calc(100% - "+O/2+"px)",transform:[D,h].filter((e=>!!e)).join(" "),...m}}),O>0&&f.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:O+(p?0:1),d:N}),f.createElement("path",{stroke:O&&!p?y.fill:"none",d:N}),f.createElement("clipPath",{id:g},f.createElement("rect",{x:-k,y:k*(P?-1:1),width:a+O,height:a})))})),kr=f.createContext(null),jr=f.createContext(null),Er=()=>{var e;return(null==(e=f.useContext(kr))?void 0:e.id)||null},Pr=()=>f.useContext(jr);function Cr(e){return"data-floating-ui-"+e}function Tr(e){const t=(0,f.useRef)(e);return vr((()=>{t.current=e})),t}const Ar=Cr("safe-polygon");function Mr(e,t,n){return n&&!Nt(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Nr=0;function Dr(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Nr);const i=()=>null==e?void 0:e.focus({preventScroll:n});o?i():Nr=requestAnimationFrame(i)}function Ir(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}let Rr=new WeakMap,Lr=new WeakSet,zr={},Br=0;const Fr=e=>e&&(e.host||Fr(e.parentNode));function Wr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=Dt(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=((e,t)=>t.map((t=>{if(e.contains(t))return t;const n=Fr(t);return e.contains(n)?n:null})).filter((e=>null!=e)))(t,e),s=new Set,l=new Set(a),c=[];zr[o]||(zr[o]=new WeakMap);const u=zr[o];return a.forEach((function e(t){!t||s.has(t)||(s.add(t),t.parentNode&&e(t.parentNode))})),function e(t){!t||l.has(t)||[].forEach.call(t.children,(t=>{if("script"!==it(t))if(s.has(t))e(t);else{const e=i?t.getAttribute(i):null,n=null!==e&&"false"!==e,r=(Rr.get(t)||0)+1,a=(u.get(t)||0)+1;Rr.set(t,r),u.set(t,a),c.push(t),1===r&&n&&Lr.add(t),1===a&&t.setAttribute(o,""),!n&&i&&t.setAttribute(i,"true")}}))}(t),s.clear(),Br++,()=>{c.forEach((e=>{const t=(Rr.get(e)||0)-1,n=(u.get(e)||0)-1;Rr.set(e,t),u.set(e,n),t||(!Lr.has(e)&&i&&e.removeAttribute(i),Lr.delete(e)),n||e.removeAttribute(o)})),Br--,Br||(Rr=new WeakMap,Rr=new WeakMap,Lr=new WeakSet,zr={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Vr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $r(e,t){const n=wn(e,Vr());"prev"===t&&n.reverse();const r=n.indexOf(Ot(Dt(e)));return n.slice(r+1)[0]}function Ur(){return $r(document.body,"next")}function Kr(){return $r(document.body,"prev")}function qr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!kt(n,r)}function Hr(e){wn(e,Vr()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Yr(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Xr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Gr(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Zr=f.forwardRef((function(e,t){const[n,r]=f.useState();vr((()=>(Tt()&&r("button"),document.addEventListener("keydown",Gr),()=>{document.removeEventListener("keydown",Gr)})),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Cr("focus-guard")]:"",style:Xr};return f.createElement("span",br({},e,o))})),Jr=f.createContext(null),Qr=Cr("portal");function eo(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,i=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Sr(),o=to(),[i,a]=f.useState(null),s=f.useRef(null);return vr((()=>()=>{null==i||i.remove(),queueMicrotask((()=>{s.current=null}))}),[i]),vr((()=>{if(!r||s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Qr,""),e.appendChild(n),s.current=n,a(n)}),[t,r]),vr((()=>{if(null===n||!r||s.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!ct(e)&&(e=e.current),e=e||document.body;let i=null;t&&(i=document.createElement("div"),i.id=t,e.appendChild(i));const l=document.createElement("div");l.id=r,l.setAttribute(Qr,""),e=i||e,e.appendChild(l),s.current=l,a(l)}),[t,n,r,o]),i}({id:n,root:r}),[a,s]=f.useState(null),l=f.useRef(null),c=f.useRef(null),u=f.useRef(null),d=f.useRef(null),h=null==a?void 0:a.modal,m=null==a?void 0:a.open,y=!!a&&!a.modal&&a.open&&o&&!(!r&&!i);return f.useEffect((()=>{if(i&&o&&!h)return i.addEventListener("focusin",e,!0),i.addEventListener("focusout",e,!0),()=>{i.removeEventListener("focusin",e,!0),i.removeEventListener("focusout",e,!0)};function e(e){i&&qr(e)&&("focusin"===e.type?Yr:Hr)(i)}}),[i,o,h]),f.useEffect((()=>{i&&(m||Yr(i))}),[m,i]),f.createElement(Jr.Provider,{value:f.useMemo((()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s})),[o,i])},y&&i&&f.createElement(Zr,{"data-type":"outside",ref:l,onFocus:e=>{if(qr(e,i)){var t;null==(t=u.current)||t.focus()}else{const e=Kr()||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),y&&i&&f.createElement("span",{"aria-owns":i.id,style:Xr}),i&&p.createPortal(t,i),y&&i&&f.createElement(Zr,{"data-type":"outside",ref:c,onFocus:e=>{if(qr(e,i)){var t;null==(t=d.current)||t.focus()}else{const t=Ur()||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),null!=a&&a.closeOnFocusOut&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const to=()=>f.useContext(Jr),no="data-floating-ui-focusable";function ro(e){return e?e.hasAttribute(no)?e:e.querySelector("["+no+"]")||e:null}let oo=[];function io(e){oo=oo.filter((e=>e.isConnected));let t=e;if(t&&"body"!==it(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ln.call(e,an)&&vn(t,e)}(t,Vr())){const e=wn(t,Vr())[0];e&&(t=e)}oo.push(t),oo.length>20&&(oo=oo.slice(-20))}}function ao(){return oo.slice().reverse().find((e=>e.isConnected))}const so=f.forwardRef((function(e,t){return f.createElement("button",br({},e,{type:"button",ref:t,tabIndex:-1,style:Xr}))}));function lo(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:p,refs:h,nodeId:m,onOpenChange:y,events:g,dataRef:v,floatingId:b,elements:{domReference:x,floating:w}}=t,_="number"==typeof a&&a<0,S=Bt(x)&&_,O=!(typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype)||i,k=Tr(o),j=Tr(a),E=Tr(s),P=Pr(),C=to(),T=f.useRef(null),A=f.useRef(null),M=f.useRef(!1),N=f.useRef(!1),D=f.useRef(-1),I=null!=C,R=ro(w),L=ir((function(e){return void 0===e&&(e=R),e?wn(e,Vr()):[]})),z=ir((e=>{const t=L(e);return k.current.map((e=>x&&"reference"===e?x:R&&"floating"===e?R:t)).filter(Boolean).flat()}));function B(e){return!r&&u&&c?f.createElement(so,{ref:"start"===e?T:A,onClick:e=>y(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}f.useEffect((()=>{if(r||!c)return;function e(e){if("Tab"===e.key){kt(R,Ot(Dt(R)))&&0===L().length&&!S&&zt(e);const t=z(),n=Rt(e);"reference"===k.current[0]&&n===x&&(zt(e),e.shiftKey?Dr(t[t.length-1]):Dr(t[1])),"floating"===k.current[1]&&n===R&&e.shiftKey&&(zt(e),Dr(t[0]))}}const t=Dt(R);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}}),[r,x,R,c,k,S,L,z]),f.useEffect((()=>{if(!r&&w)return w.addEventListener("focusin",e),()=>{w.removeEventListener("focusin",e)};function e(e){const t=Rt(e),n=L().indexOf(t);-1!==n&&(D.current=n)}}),[r,w,L]),f.useEffect((()=>{if(!r&&d)return w&&ut(x)?(x.addEventListener("focusout",t),x.addEventListener("pointerdown",e),w.addEventListener("focusout",t),()=>{x.removeEventListener("focusout",t),x.removeEventListener("pointerdown",e),w.removeEventListener("focusout",t)}):void 0;function e(){N.current=!0,setTimeout((()=>{N.current=!1}))}function t(e){const t=e.relatedTarget;queueMicrotask((()=>{const n=!(kt(x,t)||kt(w,t)||kt(t,w)||kt(null==C?void 0:C.portalNode,t)||null!=t&&t.hasAttribute(Cr("focus-guard"))||P&&(Ir(P.nodesRef.current,m).find((e=>{var n,r;return kt(null==(n=e.context)?void 0:n.elements.floating,t)||kt(null==(r=e.context)?void 0:r.elements.domReference,t)}))||function(e,t){var n;let r=[],o=null==(n=e.find((e=>e.id===t)))?void 0:n.parentId;for(;o;){const t=e.find((e=>e.id===o));o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(P.nodesRef.current,m).find((e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t}))));if(l&&n&&Ot(Dt(R))===Dt(R).body){ut(R)&&R.focus();const e=D.current,t=L(),n=t[e]||t[t.length-1]||R;ut(n)&&n.focus()}(S||!c)&&t&&n&&!N.current&&t!==ao()&&(M.current=!0,y(!1,e,"focus-out"))}))}}),[r,x,w,R,c,m,P,C,y,d,l,L,S]),f.useEffect((()=>{var e;if(r)return;const t=Array.from((null==C||null==(e=C.portalNode)?void 0:e.querySelectorAll("["+Cr("portal")+"]"))||[]);if(w){const e=[w,...t,T.current,A.current,k.current.includes("reference")||S?x:null].filter((e=>null!=e)),n=c||S?Wr(e,O,!O):Wr(e);return()=>{n()}}}),[r,x,w,c,k,C,S,O]),vr((()=>{if(r||!ut(R))return;const e=Ot(Dt(R));queueMicrotask((()=>{const t=z(R),n=j.current,r=("number"==typeof n?t[n]:n.current)||R,o=kt(R,e);!_&&!o&&p&&Dr(r,{preventScroll:r===R})}))}),[r,p,R,_,z,j]),vr((()=>{if(r||!R)return;let e=!1;const t=Dt(R),n=Ot(t);let o=v.current.openEvent;function i(t){let{open:n,reason:r,event:i,nested:a}=t;n&&(o=i),"escape-key"===r&&h.domReference.current&&io(h.domReference.current),"hover"===r&&"mouseleave"===i.type&&(M.current=!0),"outside-press"===r&&(a?(M.current=!1,e=!0):M.current=!(Pt(i)||Ct(i)))}io(n),g.on("openchange",i);const a=t.createElement("span");return a.setAttribute("tabindex","-1"),a.setAttribute("aria-hidden","true"),Object.assign(a.style,Xr),I&&x&&x.insertAdjacentElement("afterend",a),()=>{g.off("openchange",i);const n=Ot(t),r=kt(w,n)||P&&Ir(P.nodesRef.current,m).some((e=>{var t;return kt(null==(t=e.context)?void 0:t.elements.floating,n)}));(r||o&&["click","mousedown"].includes(o.type))&&h.domReference.current&&io(h.domReference.current);const s="boolean"==typeof E.current?ao()||a:E.current.current||a;queueMicrotask((()=>{E.current&&!M.current&&ut(s)&&(!(s!==n&&n!==t.body)||r)&&s.focus({preventScroll:e}),a.remove()}))}}),[r,w,R,E,v,h,g,P,m,I,x]),f.useEffect((()=>{queueMicrotask((()=>{M.current=!1}))}),[r]),vr((()=>{if(!r&&C)return C.setFocusManagerState({modal:c,closeOnFocusOut:d,open:p,onOpenChange:y,refs:h}),()=>{C.setFocusManagerState(null)}}),[r,C,c,p,y,h,d]),vr((()=>{if(r||!R||"function"!=typeof MutationObserver||_)return;const e=()=>{const e=R.getAttribute("tabindex"),t=L(),n=Ot(Dt(w)),r=t.indexOf(n);-1!==r&&(D.current=r),k.current.includes("floating")||n!==h.domReference.current&&0===t.length?"0"!==e&&R.setAttribute("tabindex","0"):"-1"!==e&&R.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(R,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}}),[r,w,R,h,k,L,_]);const F=!r&&O&&(!c||!S)&&(I||c);return f.createElement(f.Fragment,null,F&&f.createElement(Zr,{"data-type":"inside",ref:null==C?void 0:C.beforeInsideRef,onFocus:e=>{if(c){const e=z();Dr("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=C&&C.preserveTabOrder&&C.portalNode)if(M.current=!1,qr(e,C.portalNode)){const e=Ur()||x;null==e||e.focus()}else{var t;null==(t=C.beforeOutsideRef.current)||t.focus()}}}),!S&&B("start"),n,B("end"),F&&f.createElement(Zr,{"data-type":"inside",ref:null==C?void 0:C.afterInsideRef,onFocus:e=>{if(c)Dr(z()[0]);else if(null!=C&&C.preserveTabOrder&&C.portalNode)if(d&&(M.current=!0),qr(e,C.portalNode)){const e=Kr()||x;null==e||e.focus()}else{var t;null==(t=C.afterOutsideRef.current)||t.focus()}}}))}function co(e){return ut(e.target)&&"BUTTON"===e.target.tagName}function uo(e){return Lt(e)}function fo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,p=f.useRef(),h=f.useRef(!1),m=f.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==s&&(Nt(t,!0)&&c||(!n||!l||o.current.openEvent&&d&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===s&&p.current?p.current=void 0:Nt(t,!0)&&c||(!n||!l||o.current.openEvent&&d&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,!e.defaultPrevented&&u&&!co(e)&&(" "===e.key&&!uo(i)&&(e.preventDefault(),h.current=!0),"Enter"===e.key&&r(!(n&&l),e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||co(e)||uo(i)||" "===e.key&&h.current&&(h.current=!1,r(!(n&&l),e.nativeEvent,"click"))}})),[o,i,s,c,u,r,n,d,l]);return f.useMemo((()=>a?{reference:m}:{}),[a,m])}const po={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},ho={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},mo=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function yo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=e,{enabled:a=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:p=!1,bubbles:h,capture:m}=t,y=Pr(),g=ir("function"==typeof l?l:()=>!1),v="function"==typeof l?g:l,b=f.useRef(!1),x=f.useRef(!1),{escapeKey:w,outsidePress:_}=mo(h),{escapeKey:S,outsidePress:O}=mo(m),k=f.useRef(!1),j=ir((e=>{var t;if(!n||!a||!s||"Escape"!==e.key||k.current)return;const o=null==(t=i.current.floatingContext)?void 0:t.nodeId,l=y?Ir(y.nodesRef.current,o):[];if(!w&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),E=ir((e=>{var t;const n=()=>{var t;j(e),null==(t=Rt(e))||t.removeEventListener("keydown",n)};null==(t=Rt(e))||t.addEventListener("keydown",n)})),P=ir((e=>{var t;const n=b.current;b.current=!1;const a=x.current;if(x.current=!1,"click"===c&&a||n||"function"==typeof v&&!v(e))return;const s=Rt(e),l="["+Cr("inert")+"]",u=Dt(o.floating).querySelectorAll(l);let f=ct(s)?s:null;for(;f&&!gt(f);){const e=xt(f);if(gt(e)||!ct(e))break;f=e}if(u.length&&ct(s)&&!function(e){return e.matches("html,body")}(s)&&!kt(s,o.floating)&&Array.from(u).every((e=>!kt(f,e))))return;if(ut(s)&&A){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===vt(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const d=null==(t=i.current.floatingContext)?void 0:t.nodeId,p=y&&Ir(y.nodesRef.current,d).some((t=>{var n;return It(e,null==(n=t.context)?void 0:n.elements.floating)}));if(It(e,o.floating)||It(e,o.domReference)||p)return;const h=y?Ir(y.nodesRef.current,d):[];if(h.length>0){let e=!0;if(h.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}r(!1,e,"outside-press")})),C=ir((e=>{var t;const n=()=>{var t;P(e),null==(t=Rt(e))||t.removeEventListener(c,n)};null==(t=Rt(e))||t.addEventListener(c,n)}));f.useEffect((()=>{if(!n||!a)return;i.current.__escapeKeyBubbles=w,i.current.__outsidePressBubbles=_;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),k.current=!0}function u(){e=window.setTimeout((()=>{k.current=!1}),yt()?5:0)}const f=Dt(o.floating);s&&(f.addEventListener("keydown",S?E:j,S),f.addEventListener("compositionstart",l),f.addEventListener("compositionend",u)),v&&f.addEventListener(c,O?C:P,O);let d=[];return p&&(ct(o.domReference)&&(d=_t(o.domReference)),ct(o.floating)&&(d=d.concat(_t(o.floating))),!ct(o.reference)&&o.reference&&o.reference.contextElement&&(d=d.concat(_t(o.reference.contextElement)))),d=d.filter((e=>{var t;return e!==(null==(t=f.defaultView)?void 0:t.visualViewport)})),d.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{s&&(f.removeEventListener("keydown",S?E:j,S),f.removeEventListener("compositionstart",l),f.removeEventListener("compositionend",u)),v&&f.removeEventListener(c,O?C:P,O),d.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[i,o,s,v,c,n,r,p,a,w,_,j,S,E,P,O,C]),f.useEffect((()=>{b.current=!1}),[v,c]);const T=f.useMemo((()=>({onKeyDown:j,[po[d]]:e=>{u&&r(!1,e.nativeEvent,"reference-press")}})),[j,r,u,d]),A=f.useMemo((()=>({onKeyDown:j,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[ho[c]]:()=>{b.current=!0}})),[j,c]);return f.useMemo((()=>a?{reference:T,floating:A}:{}),[a,T,A])}function go(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Sr(),i=f.useRef({}),[a]=f.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),s=null!=Er(),[l,c]=f.useState(r.reference),u=ir(((e,t,r)=>{i.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)})),d=f.useMemo((()=>({setPositionReference:c})),[]),p=f.useMemo((()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference})),[l,r.reference,r.floating]);return f.useMemo((()=>({dataRef:i,open:t,onOpenChange:u,elements:p,events:a,floatingId:o,refs:d})),[t,u,p,a,o,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[i,a]=f.useState(null),[s,l]=f.useState(null),c=(null==o?void 0:o.domReference)||i,u=f.useRef(null),d=Pr();vr((()=>{c&&(u.current=c)}),[c]);const h=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=f.useState(r);Hn(h,r)||m(r);const[y,g]=f.useState(null),[v,b]=f.useState(null),x=f.useCallback((e=>{e!==O.current&&(O.current=e,g(e))}),[]),w=f.useCallback((e=>{e!==k.current&&(k.current=e,b(e))}),[]),_=i||y,S=a||v,O=f.useRef(null),k=f.useRef(null),j=f.useRef(u),E=null!=l,P=Gn(l),C=Gn(o),T=Gn(c),A=f.useCallback((()=>{if(!O.current||!k.current)return;const e={placement:t,strategy:n,middleware:h};C.current&&(e.platform=C.current),((e,t,n)=>{const r=new Map,o={platform:Bn,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=_n(c,r,l),d=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:y,y:g,data:v,reset:b}=await m({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=y??u,f=g??f,p={...p,[i]:{...p[i],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=_n(c,d,l))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})})(O.current,k.current,e).then((e=>{const t={...e,isPositioned:!1!==T.current};M.current&&!Hn(j.current,t)&&(j.current=t,p.flushSync((()=>{d(t)})))}))}),[h,t,n,C,T]);qn((()=>{!1===c&&j.current.isPositioned&&(j.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const M=f.useRef(!1);qn((()=>(M.current=!0,()=>{M.current=!1})),[]),qn((()=>{if(_&&(O.current=_),S&&(k.current=S),_&&S){if(P.current)return P.current(_,S,A);A()}}),[_,S,A,P,E]);const N=f.useMemo((()=>({reference:O,floating:k,setReference:x,setFloating:w})),[x,w]),D=f.useMemo((()=>({reference:_,floating:S})),[_,S]),I=f.useMemo((()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Xn(D.floating,u.x),r=Xn(D.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Yn(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,D.floating,u.x,u.y]);return f.useMemo((()=>({...u,update:A,refs:N,elements:D,floatingStyles:I})),[u,A,N,D,I])}({...e,elements:{...o,...s&&{reference:s}}}),m=f.useCallback((e=>{const t=ct(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),h.refs.setReference(t)}),[h.refs]),y=f.useCallback((e=>{(ct(e)||null===e)&&(u.current=e,a(e)),(ct(h.refs.reference.current)||null===h.refs.reference.current||null!==e&&!ct(e))&&h.refs.setReference(e)}),[h.refs]),g=f.useMemo((()=>({...h.refs,setReference:y,setPositionReference:m,domReference:u})),[h.refs,y,m]),v=f.useMemo((()=>({...h.elements,domReference:c})),[h.elements,c]),b=f.useMemo((()=>({...h,...r,refs:g,elements:v,nodeId:t})),[h,g,v,t,r]);return vr((()=>{r.dataRef.current.floatingContext=b;const e=null==d?void 0:d.nodesRef.current.find((e=>e.id===t));e&&(e.context=b)})),f.useMemo((()=>({...h,context:b,refs:g,elements:v})),[h,g,v,b])}const vo="active",bo="selected";function xo(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[vo]:t,[bo]:n,...r}=e;i=r}return{..."floating"===n&&{tabIndex:-1,[no]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>(t&&Object.entries(t).forEach((t=>{let[n,i]=t;if(!o||![vo,bo].includes(n))if(0===n.indexOf("on")){var a;r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(a=r.get(n))||a.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})}else e[n]=i})),e)),{})}}function wo(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),r=e.map((e=>null==e?void 0:e.item)),o=f.useCallback((t=>xo(t,e,"reference")),t),i=f.useCallback((t=>xo(t,e,"floating")),n),a=f.useCallback((t=>xo(t,e,"item")),r);return f.useMemo((()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:a})),[o,i,a])}let _o=!1;function So(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Oo(e,t){return So(t,e===ar||e===sr,e===lr||e===cr)}function ko(e,t,n){return So(t,e===sr,n?e===lr:e===cr)||"Enter"===e||" "===e||""===e}function jo(e,t,n){return So(t,n?e===cr:e===lr,e===ar)}const Eo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Po(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:i=!0,role:a="dialog"}=t,s=null!=(n=Eo.get(a))?n:a,l=Sr(),c=null!=Er(),u=f.useMemo((()=>"tooltip"===s||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===s?"dialog":s,"aria-controls":r?o:void 0,..."listbox"===s&&{role:"combobox"},..."menu"===s&&{id:l},..."menu"===s&&c&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[s,o,c,r,l,a]),d=f.useMemo((()=>{const e={id:o,...s&&{role:s}};return"tooltip"===s||"label"===a?e:{...e,..."menu"===s&&{"aria-labelledby":l}}}),[s,o,l,a]),p=f.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[o,a]);return f.useMemo((()=>i?{reference:u,floating:d,item:p}:{}),[i,u,d,p])}const Co=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function To(e,t){return"function"==typeof e?e(t):e}function Ao(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:i,duration:a=250}=t,s=e.placement,l=s.split("-")[0],c=f.useMemo((()=>({side:l,placement:s})),[l,s]),u="number"==typeof a,d=(u?a:a.open)||0,p=(u?a:a.close)||0,[h,m]=f.useState((()=>({...To(i,c),...To(n,c)}))),{isMounted:y,status:g}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,i=("number"==typeof o?o:o.close)||0,[a,s]=f.useState("unmounted"),l=function(e,t){const[n,r]=f.useState(e);return e&&!n&&r(!0),f.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>r(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,i);return!l&&"close"===a&&s("unmounted"),vr((()=>{if(r){if(n){s("initial");const e=requestAnimationFrame((()=>{s("open")}));return()=>{cancelAnimationFrame(e)}}s("close")}}),[n,r]),{isMounted:l,status:a}}(e,{duration:a}),v=Tr(n),b=Tr(r),x=Tr(o),w=Tr(i);return vr((()=>{const e=To(v.current,c),t=To(x.current,c),n=To(w.current,c),r=To(b.current,c)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===g&&m((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===g&&m({transitionProperty:Object.keys(r).map(Co).join(","),transitionDuration:d+"ms",...n,...r}),"close"===g){const r=t||e;m({transitionProperty:Object.keys(r).map(Co).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,x,v,b,w,d,g,c]),{isMounted:y,styles:h}}function Mo(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,a=i-1;e<i;a=e++){const[i,s]=t[e]||[0,0],[l,c]=t[a]||[0,0];s>=r!=c>=r&&n<=(l-i)*(r-s)/(c-s)+i&&(o=!o)}return o}function No(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,a=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:f,onClose:d,nodeId:p,tree:h}=e;return function(e){function m(){clearTimeout(o),d()}if(clearTimeout(o),!f.domReference||!f.floating||null==u||null==n||null==c)return;const{clientX:y,clientY:g}=e,v=[y,g],b=Rt(e),x="mouseleave"===e.type,w=kt(f.floating,b),_=kt(f.domReference,b),S=f.domReference.getBoundingClientRect(),O=f.floating.getBoundingClientRect(),k=u.split("-")[0],j=n>O.right-O.width/2,E=c>O.bottom-O.height/2,P=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(v,S),C=O.width>S.width,T=O.height>S.height,A=(C?S:O).left,M=(C?S:O).right,N=(T?S:O).top,D=(T?S:O).bottom;if(w&&(i=!0,!x))return;if(_&&(i=!1),_&&!x)return void(i=!0);if(x&&ct(e.relatedTarget)&&kt(f.floating,e.relatedTarget)||h&&Ir(h.nodesRef.current,p).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===k&&c>=S.bottom-1||"bottom"===k&&c<=S.top+1||"left"===k&&n>=S.right-1||"right"===k&&n<=S.left+1)return m();let I=[];switch(k){case"top":I=[[A,S.top+1],[A,O.bottom-1],[M,O.bottom-1],[M,S.top+1]];break;case"bottom":I=[[A,O.top+1],[A,S.bottom-1],[M,S.bottom-1],[M,O.top+1]];break;case"left":I=[[O.right-1,D],[O.right-1,N],[S.left+1,N],[S.left+1,D]];break;case"right":I=[[S.right-1,D],[S.right-1,N],[O.left+1,N],[O.left+1,D]]}if(!Mo([y,g],I)){if(i&&!P)return m();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===a||null===s||0===r)return a=e,s=t,l=n,null;const o=e-a,i=t-s,c=Math.sqrt(o*o+i*i)/r;return a=e,s=t,l=n,c}(e.clientX,e.clientY);if(null!==t&&t<.1)return m()}Mo([y,g],function(e){let[n,r]=e;switch(k){case"top":return[[C?n+t/2:j?n+4*t:n-4*t,r+t+1],[C?n-t/2:j?n+4*t:n-4*t,r+t+1],[O.left,j||C?O.bottom-t:O.top],[O.right,j?C?O.bottom-t:O.top:O.bottom-t]];case"bottom":return[[C?n+t/2:j?n+4*t:n-4*t,r-t],[C?n-t/2:j?n+4*t:n-4*t,r-t],[O.left,j||C?O.top+t:O.bottom],[O.right,j?C?O.top+t:O.bottom:O.top+t]];case"left":{const e=[n+t+1,T?r+t/2:E?r+4*t:r-4*t],o=[n+t+1,T?r-t/2:E?r+4*t:r-4*t];return[[E||T?O.right-t:O.left,O.top],[E?T?O.right-t:O.left:O.right-t,O.bottom],e,o]}case"right":return[[n-t,T?r+t/2:E?r+4*t:r-4*t],[n-t,T?r-t/2:E?r+4*t:r-4*t],[E||T?O.left+t:O.right,O.top],[E?T?O.left+t:O.right:O.left+t,O.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(m,40)):m()}}};return c.__options={blockPointerEvents:n},c}const Do="light",Io="neutral",Ro=({icon:e,theme:t=Do,variant:n=Io})=>{var r;const o="[&>svg]:h-5 [&>svg]:w-5",i=(({theme:e=Do,variant:t=Io})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,f.isValidElement)(e))return(0,f.cloneElement)(e,{className:ve(o,i,(null==(r=null==e?void 0:e.props)?void 0:r.className)??"")});const a={neutral:(0,u.jsx)(Fe,{className:ve(o,i)}),info:(0,u.jsx)(Fe,{className:ve(o,i)}),success:(0,u.jsx)(De,{className:ve(o,i)}),warning:(0,u.jsx)(Ye,{className:ve(o,i)}),error:(0,u.jsx)(He,{className:ve(o,i)})};return a[n]||a.neutral},Lo=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=Do})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,u.jsx)(Oe,{variant:"outline",size:"xs",onClick:t,className:ve("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,u.jsx)(Oe,{variant:"link",size:"xs",onClick:t,className:ve(o,i),children:n});default:return null}},zo=({theme:e=Do,title:t="",inline:n=!1})=>t?(0,u.jsx)("span",{className:ve("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,Bo=({theme:e=Do,content:t="",inline:n=!1})=>t?(0,u.jsx)("span",{className:ve({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal",n?"inline":"block"),children:t}):null,Fo=(...e)=>t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))},Wo=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:o=!1,open:i,setOpen:a,children:s,className:l,tooltipPortalRoot:c,tooltipPortalId:d,boundary:p="clippingAncestors",strategy:h="fixed",offset:m=8,triggers:y=["hover","focus"],interactive:g=!1})=>{const v=(0,f.useMemo)((()=>"boolean"==typeof i&&"function"==typeof a),[i,a]),[b,x]=(0,f.useState)(!1),w=(0,f.useRef)(null),{refs:_,floatingStyles:S,context:O}=go({open:v?i:b,onOpenChange:v?a:x,placement:t,strategy:h,middleware:[Jn(m),er({boundary:p}),Qn({boundary:p}),nr({element:w})],whileElementsMounted:Fn}),k=fo(O,{enabled:!v&&y.includes("click")}),j=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:i,elements:a}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:p=!0}=t,h=Pr(),m=Er(),y=Tr(c),g=Tr(l),v=Tr(n),b=f.useRef(),x=f.useRef(-1),w=f.useRef(),_=f.useRef(-1),S=f.useRef(!0),O=f.useRef(!1),k=f.useRef((()=>{})),j=f.useRef(!1),E=f.useCallback((()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[o]);f.useEffect((()=>{if(s)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(_.current),S.current=!0,j.current=!1)}}),[s,i]),f.useEffect((()=>{if(!s||!y.current||!n)return;function e(e){E()&&r(!1,e,"hover")}const t=Dt(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,r,s,y,E]);const P=f.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Mr(g.current,"close",b.current);o&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>r(!1,e,n)),o)):t&&(clearTimeout(x.current),r(!1,e,n))}),[g,r]),C=ir((()=>{k.current(),w.current=void 0})),T=ir((()=>{if(O.current){const e=Dt(a.floating).body;e.style.pointerEvents="",e.removeAttribute(Ar),O.current=!1}})),A=ir((()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type)));f.useEffect((()=>{if(s&&ct(a.domReference)){var e;const r=a.domReference;return n&&r.addEventListener("mouseleave",l),null==(e=a.floating)||e.addEventListener("mouseleave",l),p&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",i),()=>{var e;n&&r.removeEventListener("mouseleave",l),null==(e=a.floating)||e.removeEventListener("mouseleave",l),p&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",i)}}function t(e){if(clearTimeout(x.current),S.current=!1,u&&!Nt(b.current)||d>0&&!Mr(g.current,"open"))return;const t=Mr(g.current,"open",b.current);t?x.current=window.setTimeout((()=>{v.current||r(!0,e,"hover")}),t):n||r(!0,e,"hover")}function i(e){if(A())return;k.current();const t=Dt(a.floating);if(clearTimeout(_.current),j.current=!1,y.current&&o.current.floatingContext){n||clearTimeout(x.current),w.current=y.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),C(),A()||P(e,!0,"safe-polygon")}});const r=w.current;return t.addEventListener("mousemove",r),void(k.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!kt(a.floating,e.relatedTarget))&&P(e)}function l(e){A()||o.current.floatingContext&&(null==y.current||y.current({...o.current.floatingContext,tree:h,x:e.clientX,y:e.clientY,onClose(){T(),C(),A()||P(e)}})(e))}}),[a,s,e,u,d,p,P,C,T,r,n,v,h,g,y,o,A]),vr((()=>{var e;if(s&&n&&null!=(e=y.current)&&e.__options.blockPointerEvents&&E()){O.current=!0;const e=a.floating;if(ct(a.domReference)&&e){var t;const n=Dt(a.floating).body;n.setAttribute(Ar,"");const r=a.domReference,o=null==h||null==(t=h.nodesRef.current.find((e=>e.id===m)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[s,n,m,a,h,y,E]),vr((()=>{n||(b.current=void 0,j.current=!1,C(),T())}),[n,C,T]),f.useEffect((()=>()=>{C(),clearTimeout(x.current),clearTimeout(_.current),T()}),[s,a.domReference,C,T]);const M=f.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){!S.current&&!v.current&&r(!0,t,"hover")}u&&!Nt(b.current)||n||0===d||j.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(_.current),"touch"===b.current?o():(j.current=!0,_.current=window.setTimeout(o,d)))}}}),[u,r,n,v,d]),N=f.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){A()||P(e.nativeEvent,!1)}})),[P,A]);return f.useMemo((()=>s?{reference:M,floating:N}:{}),[s,M,N])}(O,{move:!1,enabled:!v&&y.includes("hover"),...g&&{handleClose:No()}}),E=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:i,elements:a}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=f.useRef(!1),u=f.useRef(),d=f.useRef(!0);f.useEffect((()=>{if(!s)return;const e=at(a.domReference);function t(){!n&&ut(a.domReference)&&a.domReference===Ot(Dt(a.domReference))&&(c.current=!0)}function r(){d.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,s]),f.useEffect((()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;("reference-press"===t||"escape-key"===t)&&(c.current=!0)}}),[o,s]),f.useEffect((()=>()=>{clearTimeout(u.current)}),[]);const p=f.useMemo((()=>({onPointerDown(e){Ct(e.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(e){if(c.current)return;const t=Rt(e.nativeEvent);if(l&&ct(t))try{if(Tt()&&Mt())throw Error();if(!t.matches(":focus-visible"))return}catch{if(!d.current&&!Lt(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){c.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=ct(t)&&t.hasAttribute(Cr("focus-guard"))&&"outside"===t.getAttribute("data-type");u.current=window.setTimeout((()=>{var e;const s=Ot(a.domReference?a.domReference.ownerDocument:document);!t&&s===a.domReference||kt(null==(e=i.current.floatingContext)?void 0:e.refs.floating.current,s)||kt(a.domReference,s)||o||r(!1,n,"focus")}))}})),[i,a.domReference,r,l]);return f.useMemo((()=>s?{reference:p}:{}),[s,p])}(O,{enabled:!v&&y.includes("focus")}),P=yo(O),C=Po(O,{role:"tooltip"}),{getReferenceProps:T,getFloatingProps:A}=wo([k,j,E,P,C]),{isMounted:M,styles:N}=Ao(O,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),D={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],I="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";return(0,u.jsxs)(f.Fragment,{children:[(0,f.isValidElement)(s)&&(0,u.jsx)(f.Fragment,{children:(0,f.cloneElement)(s,{ref:Fo(s.ref,_.setReference),className:ve(s.props.className),...T()})},"tooltip-reference"),(0,u.jsx)(eo,{id:d,root:c,children:M&&(0,u.jsxs)("div",{className:ve("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",D,"max-w-80 w-fit",l),ref:_.setFloating,style:{...S,...N},...A(),children:[(0,u.jsxs)("div",{children:[!!n&&(0,u.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&(0,u.jsx)("div",{className:"font-normal",children:r},"tooltip-content")]}),o&&(0,u.jsx)(Or,{ref:w,context:O,className:ve("fill-current",I)})]})})]})};Wo.displayName="Tooltip";const Vo=(0,f.createContext)({}),$o=()=>(0,f.useContext)(Vo),Uo=({children:e,name:t,style:n="simple",size:r="md",value:o,defaultValue:i,by:a="id",as:s="div",onChange:l,className:c,disableGroup:d=!1,vertical:p=!1,columns:h=4,multiSelection:m=!1,gapClassName:y="gap-2"})=>{const g=(0,f.useMemo)((()=>typeof o<"u"),[o]),v=(0,f.useMemo)((()=>t||`radio-button-group-${ke()}`),[t]);let b;b=g?o:m?i??[]:i;const[x,w]=(0,f.useState)(b),_=(0,f.useCallback)((e=>{if(m)w((t=>{let n;return n=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter((t=>t!==e)):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof l&&l(n),n}));else{if(g||w(e),"function"!=typeof l)return;l(e)}}),[l]);c=ve("grid grid-cols-4",we[h],y,"tile"===n&&"gap-0",p&&"grid-cols-1",c);const S=ve("tile"===n?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",c),O=()=>(0,u.jsx)(Vo.Provider,{value:{name:v,value:g?o:x,by:a,onChange:_,isControlled:g,disableAll:d,style:n,columns:h,multiSelection:m,size:r},children:f.Children.map(e,(e=>(0,f.isValidElement)(e)?e:null))});return(0,u.jsx)(u.Fragment,{children:"tile"===n?(0,u.jsx)("div",{className:S,children:O()}):(0,u.jsx)(s,{...s===f.Fragment?{}:{className:c},children:O()})})};Uo.displayName="RadioButton.Group";const Ko=(0,f.forwardRef)((({id:e,label:t,value:n,children:r,disabled:o,icon:i=null,inlineIcon:a=!1,hideSelection:s=!1,reversePosition:l=!1,borderOn:c=!1,borderOnActive:d=!0,badgeItem:p=null,useSwitch:h=!1,info:m,minWidth:y=!0,...g},v)=>{var b,x;const{buttonWrapperClasses:w,..._}=g,S=$o(),{name:O,value:k,by:j,onChange:E,disableAll:P,checked:C,multiSelection:T,size:A="md"}=S,M="primary",N=(0,f.useMemo)((()=>e||`radio-button-${ke()}`),[e]),D=(0,f.useMemo)((()=>P||o),[P,o]),I=(0,f.useMemo)((()=>T?Array.isArray(k)&&k.includes(n):typeof C<"u"?C:typeof k==typeof n&&("string"==typeof k?k===n:Array.isArray(k)?k.includes(n):k[j]===n[j])),[k,n,C]),R=(0,f.useCallback)((()=>(0,f.isValidElement)(t)?t:null!=t&&t.heading?(0,u.jsxs)("div",{className:ve(!a&&"space-y-1.5 mt-[2px]",l&&(h?"ml-10":"ml-4"),a&&"flex gap-2",a&&!t.description&&"items-center"),children:[i&&(0,u.jsx)(u.Fragment,{children:i}),(0,u.jsxs)("div",{className:ve("space-y-1.5"),children:[(0,u.jsx)("p",{className:ve("text-text-primary font-medium m-0",et[A],o&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,u.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null),[t]);if("tile"===S.style)return(0,u.jsx)(qo,{id:e,label:t,value:n,disabled:o,size:A,children:r});const L=()=>{D||(T?h&&E(n,!I):E(n))};return(0,u.jsxs)("label",{className:ve("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",y&&"min-w-[180px]",c&&"border border-border-subtle border-solid rounded-md shadow-sm hover:ring-2 hover:ring-border-interactive",d&&c&&I&&"ring-2 ring-border-interactive","sm"===A?"px-3 py-3":"px-4 py-4","pr-12",D&&"cursor-not-allowed opacity-40",w),htmlFor:N,onClick:L,children:[!!t&&(0,u.jsx)("label",{className:ve("cursor-pointer",D&&"cursor-not-allowed"),htmlFor:N,children:R()}),!!m&&(0,u.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,u.jsx)(Wo,{title:null==m?void 0:m.heading,content:null==m?void 0:m.description,children:(0,u.jsx)(Fe,{className:ve("text-text-primary",null==(b=tt[A])?void 0:b.info)})})}),(0,u.jsxs)("label",{className:ve("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",l&&"left-0",D&&"cursor-not-allowed",a&&"mr-3",h?nt[A].switch:nt[A].radio),onClick:L,children:[!!p&&p,!s&&(h?(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(Pe,{defaultValue:!1,size:A,onChange:()=>{T?E(n,!I):E(n)},checked:I,..._,"aria-label":(null==t?void 0:t.heading)??"Switch"})}):(0,u.jsxs)("span",{className:"relative p-0.5",children:[(0,u.jsx)("input",{ref:v,id:N,type:T?"checkbox":"radio",className:ve("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid",!T&&"rounded-full",Qe[M].checkbox,tt[A].checkbox,D&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:O,value:n,onChange:e=>E(e.target.value),checked:I,disabled:D,..._}),(0,u.jsx)("span",{className:ve("inline-flex items-center absolute top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",Qe[M].icon,D&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:T?(0,u.jsx)(De,{className:"sm"===A?"size-3":"size-4"}):(0,u.jsx)("div",{className:ve("rounded-full bg-current","sm"===A&&"mt-[0.5px]",null==(x=tt[A])?void 0:x.icon)})})]}))]})]})}));Ko.displayName="RadioButton.Button";const qo=({id:e,children:t,value:n,disabled:r,size:o="md",...i})=>{const a=$o(),{name:s,value:l,by:c,onChange:d,disableAll:p,checked:h}=a||{},m=(0,f.useMemo)((()=>e||`radio-button-${ke()}`),[e]),y=(0,f.useMemo)((()=>p||r),[p,r]),g=(0,f.useMemo)((()=>typeof h<"u"?h:typeof l==typeof n&&("string"==typeof l?l===n:Array.isArray(l)?l.includes(n):!(!l||!c)&&l[c]===n[c])),[l,n,h,c]),v=ve("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",y?"text-text-disabled cursor-not-allowed":"",rt[o],"border-0 border-r border-border-subtle border-solid");return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("button",{type:"button",id:m,"aria-label":"Radio Button",className:ve(v,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",g&&"bg-button-disabled"),onClick:()=>{d&&d(n)},disabled:y,...i,children:[(0,u.jsx)("input",{type:"hidden",value:n,name:s,checked:g,onChange:e=>null==d?void 0:d(e.target.value)}),t]})})},Ho=(Object.assign(Ko,{Group:Uo,Button:Ko}),(0,f.forwardRef)((({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:a=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:c=()=>{},disableHover:f=!1},d)=>{const p={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let h="",m="group relative justify-center flex items-center cursor-pointer";const y={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(h=p.disabled,m+=" cursor-not-allowed disabled"):h=p[o],e?(0,u.jsxs)("span",{className:ve("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",h,!f&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:d,children:[i?(0,u.jsx)("span",{className:ve("justify-center flex items-center",y[t]),children:i}):null,(0,u.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,u.jsxs)("span",{className:ve(m,y[t]),onMouseDown:c,role:"button",tabIndex:0,...!a&&{onClick:s},children:[(0,u.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,u.jsx)(Ze,{}),(0,u.jsx)("span",{className:"absolute -inset-1"})]})]}):null})));Ho.displayName="Badge";const Yo=(0,f.forwardRef)((({id:e,defaultValue:t="",value:n,size:r="sm",className:o="",disabled:i=!1,onChange:a=()=>{},error:s=!1,onError:l=()=>{},...c},d)=>{const p=(0,f.useMemo)((()=>e||`input-textarea-${ke()}`),[e]),h=(0,f.useMemo)((()=>typeof n<"u"),[n]),[m,y]=(0,f.useState)(t),g=(0,f.useCallback)((()=>h?n:m),[h,n,m]),v=i?"hover:border-border-disabled":"hover:border-border-strong",b=s?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,u.jsx)("textarea",{ref:d,id:p,className:ve("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none",i?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[r],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",v,b,o),disabled:i,onChange:e=>{if(i)return;const t=e.target.value;h||y(t),"function"==typeof a&&a(t)},onInvalid:l,value:g(),...c})}));Yo.displayName="TextArea",(0,f.forwardRef)((({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:o,children:i,className:a,...s},l)=>{const[c,d]=(0,f.useState)(!1),p={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand","primary-light":"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"}[e],h={xxs:"size-5 [&>svg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"}[t],m={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[r&&"none"===n?"subtle":n],y=r?"object-cover object-center":"",g=!r||c,v=g?"div":"img";return(0,f.useEffect)((()=>{d(!1)}),[r]),(0,u.jsx)(v,{ref:l,className:ve("rounded-full overflow-hidden flex items-center justify-center",g&&p,h,m,y,a),...g?{children:(()=>{var e,t,n;if(r&&c){if(o&&"string"==typeof o)return null==(e=null==o?void 0:o[0])?void 0:e.toUpperCase();if(i&&"string"==typeof i)return null==(t=null==i?void 0:i[0])?void 0:t.toUpperCase();if(!i&&!o)return(0,u.jsx)(Ge,{})}return i?"string"==typeof i?null==(n=null==i?void 0:i[0])?void 0:n.toUpperCase():i:null})()}:{src:r,alt:o,onError:()=>{d(!0)}},...s})}));const Xo=(0,f.forwardRef)((({id:e,type:t="text",defaultValue:n="",value:r,size:o="sm",className:i="",disabled:a=!1,onChange:s=()=>{},error:l=!1,onError:c=()=>{},prefix:d=null,suffix:p=null,label:h="",...m},y)=>{const g=(0,f.useRef)(null),v=(0,f.useMemo)((()=>e||`input-${t}-${ke()}`),[e]),b=(0,f.useMemo)((()=>typeof r<"u"),[r]),[x,w]=(0,f.useState)(n),[_,S]=(0,f.useState)(null),O=(0,f.useCallback)((()=>b?r:x),[b,r,x]),k=e=>{if(a)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?S(n[0].name):S(null)):n=e.target.value,!b&&"file"!==t&&w(n),"function"==typeof s&&s(n)},j=()=>{S(null),g.current&&(g.current.value=""),s(null)},E="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",P={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},C={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},T={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},A={sm:d?"pl-8":"",md:d?"pl-9":"",lg:d?"pl-10":""},M={sm:p?"pr-8":"",md:p?"pr-9":"",lg:p?"pr-10":""},N=a?"hover:outline-border-disabled":"hover:outline-border-strong",D="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",I=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",R=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",L=a?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",z=a?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",B="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",F=a?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",W={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},V=(0,f.useMemo)((()=>h?(0,u.jsx)(je,{className:ve(C[o]),htmlFor:v,...(null==m?void 0:m.required)&&{required:!0},children:h}):null),[h,o,v]),$=_?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,u.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[V,(0,u.jsxs)("div",{className:ve("w-full relative flex focus-within:z-10",i),children:[(0,u.jsx)("input",{ref:Fo(g,y),id:v,type:"file",className:ve(E,z,P[o],T[o],D,N,R,$),disabled:a,onChange:k,onInvalid:c,...m}),(0,u.jsx)("div",{className:ve(F,"right-0 pr-3",W[o]),children:(0,u.jsx)(Xe,{})})]})]}):(0,u.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[V,(0,u.jsxs)("div",{className:ve("w-full relative flex focus-within:z-10",i),children:[d?(0,u.jsx)("div",{className:ve(B,"left-0 pl-3",T[o]),children:d}):null,(0,u.jsx)("input",{ref:Fo(g,y),id:v,type:t,className:ve(E,L,P[o],T[o],A[o],M[o],D,N,I),disabled:a,onChange:k,onInvalid:c,value:O(),...m}),"file"===t?_?(0,u.jsx)("div",{className:ve(F,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",W[o]),onClick:j,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&j()},children:(0,u.jsx)(Ze,{})}):(0,u.jsx)("div",{className:ve(F,"right-0 pr-3",W[o]),children:(0,u.jsx)(Xe,{})}):p?(0,u.jsx)("div",{className:ve(B,"right-0 pr-3",T[o]),children:p}):null]})]})}));Xo.displayName="Input";const Go=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],i={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,u.jsx)("span",{className:ve("flex",i,o,r),children:n||(0,u.jsx)(We,{className:"animate-spin shrink-0"})})},Zo=(0,f.createContext)({activeItem:null,onChange:()=>{},size:"md",iconPosition:"left"}),Jo=(0,f.forwardRef)((({slug:e,text:t,icon:n,className:r,disabled:o=!1,isFirstChild:i,isLastChild:a,...s},l)=>{const c=f.useContext(Zo);if(!c)throw new Error("Button should be used inside Button Group");const{activeItem:d,onChange:p,size:h,iconPosition:m}=c,y=ve("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",o?"text-text-disabled cursor-not-allowed":"",{xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-2 px-2 text-base gap-1 [&>svg]:size-4",md:"py-2.5 px-2.5 text-base gap-1 [&>svg]:size-5"}[h],"border-0 border-r border-border-subtle border-solid",d===e?"bg-button-disabled":"",i?"rounded-tl rounded-bl border-0 border-r border-border-subtle":"",a?"rounded-tr rounded-br border-0":"",r);return(0,u.jsxs)("button",{ref:l,className:y,disabled:o,onClick:n=>{p({event:n,value:{slug:e,text:t}})},...s,children:["left"===m&&n&&(0,u.jsx)("span",{className:"mr-1",children:n}),t,"right"===m&&n&&(0,u.jsx)("span",{className:"ml-1",children:n})]})}));function Qo(e){if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function ei(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}Jo.displayName="Button";const ti=e=>Array.isArray(e);function ni(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function ri(e){return"string"==typeof e||Array.isArray(e)}function oi(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function ii(e,t,n,r){if("function"==typeof t){const[o,i]=oi(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=oi(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function ai(e,t,n){const r=e.getProps();return ii(r,t,void 0!==n?n:r.custom,e)}const si=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],li=["initial",...si],ci=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ui=new Set(ci),fi=e=>1e3*e,di=e=>e/1e3,pi={type:"spring",stiffness:500,damping:25,restSpeed:10},hi={type:"keyframes",duration:.8},mi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},yi=(e,{keyframes:t})=>t.length>2?hi:ui.has(e)?e.startsWith("scale")?(e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}))(t[1]):pi:mi;function gi(e,t){return e?e[t]||e.default||e:void 0}const vi=e=>null!==e;function bi(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(vi),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}const xi=e=>e,wi=["read","resolveKeyframes","update","preRender","render","postRender"];function _i(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=wi.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{a=e,r?o=!0:(r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:s,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:d}=a,p=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),f.process(o),d.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:wi.reduce(((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),s.schedule(t,i,a)),t}),{}),cancel:e=>{for(let t=0;t<wi.length;t++)a[wi[t]].cancel(e)},state:o,steps:a}}const{schedule:Si,cancel:Oi,state:ki,steps:ji}=_i(typeof requestAnimationFrame<"u"?requestAnimationFrame:xi,!0),Ei=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Pi(e,t,n,r){if(e===t&&n===r)return xi;return o=>0===o||1===o?o:Ei((t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=Ei(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n))(o),t,r)}const Ci=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ti=e=>t=>1-e(1-t),Ai=Pi(.33,1.53,.69,.99),Mi=Ti(Ai),Ni=Ci(Mi),Di=e=>(e*=2)<1?.5*Mi(e):.5*(2-Math.pow(2,-10*(e-1))),Ii=e=>1-Math.sin(Math.acos(e)),Ri=Ti(Ii),Li=Ci(Ii),zi=e=>/^0[^.\s]+$/u.test(e);let Bi=xi,Fi=xi;const Wi=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Vi=e=>t=>"string"==typeof t&&t.startsWith(e),$i=Vi("--"),Ui=Vi("var(--"),Ki=e=>!!Ui(e)&&qi.test(e.split("/*")[0].trim()),qi=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Hi=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Yi(e,t,n=1){Fi(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Hi.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Wi(e)?parseFloat(e):e}return Ki(o)?Yi(o,t,n+1):o}const Xi=(e,t,n)=>n>t?t:n<e?e:n,Gi={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Zi={...Gi,transform:e=>Xi(0,1,e)},Ji={...Gi,default:1},Qi=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),ea=Qi("deg"),ta=Qi("%"),na=Qi("px"),ra=Qi("vh"),oa=Qi("vw"),ia={...ta,parse:e=>ta.parse(e)/100,transform:e=>ta.transform(100*e)},aa=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),sa=e=>e===Gi||e===na,la=(e,t)=>parseFloat(e.split(", ")[t]),ca=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return la(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?la(t[1],e):0}},ua=new Set(["x","y","z"]),fa=ci.filter((e=>!ua.has(e))),da={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:ca(4,13),y:ca(5,14)};da.translateX=da.x,da.translateY=da.y;const pa=e=>t=>t.test(e),ha=[Gi,na,ta,ea,oa,ra,{test:e=>"auto"===e,parse:e=>e}],ma=e=>ha.find(pa(e)),ya=new Set;let ga=!1,va=!1;function ba(){if(va){const e=Array.from(ya).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return fa.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}va=!1,ga=!1,ya.forEach((e=>e.complete())),ya.clear()}function xa(){ya.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(va=!0)}))}class wa{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ya.add(this),ga||(ga=!0,Si.read(xa),Si.resolveKeyframes(ba))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ya.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ya.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const _a=e=>Math.round(1e5*e)/1e5,Sa=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Oa=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ka=(e,t)=>n=>!!("string"==typeof n&&Oa.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ja=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(Sa);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},Ea={...Gi,transform:e=>Math.round((e=>Xi(0,255,e))(e))},Pa={test:ka("rgb","red"),parse:ja("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ea.transform(e)+", "+Ea.transform(t)+", "+Ea.transform(n)+", "+_a(Zi.transform(r))+")"},Ca={test:ka("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Pa.transform},Ta={test:ka("hsl","hue"),parse:ja("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ta.transform(_a(t))+", "+ta.transform(_a(n))+", "+_a(Zi.transform(r))+")"},Aa={test:e=>Pa.test(e)||Ca.test(e)||Ta.test(e),parse:e=>Pa.test(e)?Pa.parse(e):Ta.test(e)?Ta.parse(e):Ca.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Pa.transform(e):Ta.transform(e)},Ma=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Na="number",Da="color",Ia=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ra(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ia,(e=>(Aa.test(e)?(r.color.push(i),o.push(Da),n.push(Aa.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(Na),n.push(parseFloat(e))),++i,"${}"))).split("${}");return{values:n,split:a,indexes:r,types:o}}function La(e){return Ra(e).values}function za(e){const{split:t,types:n}=Ra(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Na?_a(e[i]):t===Da?Aa.transform(e[i]):e[i]}return o}}const Ba=e=>"number"==typeof e?0:e,Fa={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Sa))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Ma))||void 0===n?void 0:n.length)||0)>0},parse:La,createTransformer:za,getAnimatableNone:function(e){const t=La(e);return za(e)(t.map(Ba))}},Wa=new Set(["brightness","contrast","saturate","opacity"]);function Va(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Sa)||[];if(!r)return e;const o=n.replace(r,"");let i=Wa.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const $a=/\b([a-z-]*)\(.*?\)/gu,Ua={...Fa,getAnimatableNone:e=>{const t=e.match($a);return t?t.map(Va).join(" "):e}},Ka={borderWidth:na,borderTopWidth:na,borderRightWidth:na,borderBottomWidth:na,borderLeftWidth:na,borderRadius:na,radius:na,borderTopLeftRadius:na,borderTopRightRadius:na,borderBottomRightRadius:na,borderBottomLeftRadius:na,width:na,maxWidth:na,height:na,maxHeight:na,top:na,right:na,bottom:na,left:na,padding:na,paddingTop:na,paddingRight:na,paddingBottom:na,paddingLeft:na,margin:na,marginTop:na,marginRight:na,marginBottom:na,marginLeft:na,backgroundPositionX:na,backgroundPositionY:na},qa={rotate:ea,rotateX:ea,rotateY:ea,rotateZ:ea,scale:Ji,scaleX:Ji,scaleY:Ji,scaleZ:Ji,skew:ea,skewX:ea,skewY:ea,distance:na,translateX:na,translateY:na,translateZ:na,x:na,y:na,z:na,perspective:na,transformPerspective:na,opacity:Zi,originX:ia,originY:ia,originZ:na},Ha={...Gi,transform:Math.round},Ya={...Ka,...qa,zIndex:Ha,size:na,fillOpacity:Zi,strokeOpacity:Zi,numOctaves:Ha},Xa={...Ya,color:Aa,backgroundColor:Aa,outlineColor:Aa,fill:Aa,stroke:Aa,borderColor:Aa,borderTopColor:Aa,borderRightColor:Aa,borderBottomColor:Aa,borderLeftColor:Aa,filter:Ua,WebkitFilter:Ua},Ga=e=>Xa[e];function Za(e,t){let n=Ga(e);return n!==Ua&&(n=Fa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ja=new Set(["auto","none","0"]);class Qa extends wa{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Ki(r))){const o=Yi(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!aa.has(n)||2!==e.length)return;const[r,o]=e,i=ma(r),a=ma(o);if(i!==a)if(sa(i)&&sa(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||zi(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Ja.has(t)&&Ra(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Za(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=da[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,a=r[i];r[i]=da[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),!(null===(e=this.removedTransforms)||void 0===e)&&e.length&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}function es(e){return"function"==typeof e}let ts;function ns(){ts=void 0}const rs={now:()=>(void 0===ts&&rs.set(ki.isProcessing?ki.timestamp:performance.now()),ts),set:e=>{ts=e,queueMicrotask(ns)}},os=(e,t)=>"zIndex"!==t&&!("number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Fa.test(e)&&"0"!==e||e.startsWith("url(")));class is{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rs.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&(xa(),ba()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=rs.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:a,onUpdate:s,isGenerator:l}=this.options;if(!l&&!function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=os(o,t),s=os(i,t);return Bi(a===s,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||es(n))&&r)}(e,n,r,o)){if(!i)return null==s||s(bi(e,this.options,t)),null==a||a(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}function as(e,t){return t?e*(1e3/t):0}function ss(e,t,n){const r=Math.max(t-5,0);return as(n-e(r),t-r)}const ls=.001;const cs=12;function us(e,t){return e*Math.sqrt(1-t*t)}const fs=["duration","bounce"],ds=["stiffness","damping","mass"];function ps(e,t){return t.some((t=>void 0!==e[t]))}function hs({keyframes:e,restDelta:t,restSpeed:n,...r}){const o=e[0],i=e[e.length-1],a={done:!1,value:o},{stiffness:s,damping:l,mass:c,duration:u,velocity:f,isResolvedFromDuration:d}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!ps(e,ds)&&ps(e,fs)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let o,i;Bi(e<=fi(10),"Spring duration must be 10 seconds or less");let a=1-t;a=Xi(.05,1,a),e=Xi(.01,10,di(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=us(t,a),l=Math.exp(-o);return ls-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=us(Math.pow(t,2),a);return(-o(t)+ls>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-ls,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<cs;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=fi(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...r,velocity:-di(r.velocity||0)}),p=f||0,h=l/(2*Math.sqrt(s*c)),m=i-o,y=di(Math.sqrt(s/c)),g=Math.abs(m)<5;let v;if(n||(n=g?.01:2),t||(t=g?.005:.5),h<1){const e=us(y,h);v=t=>{const n=Math.exp(-h*y*t);return i-n*((p+h*y*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===h)v=e=>i-Math.exp(-y*e)*(m+(p+y*m)*e);else{const e=y*Math.sqrt(h*h-1);v=t=>{const n=Math.exp(-h*y*t),r=Math.min(e*t,300);return i-n*((p+h*y*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:d&&u||null,next:e=>{const r=v(e);if(d)a.done=e>=u;else{let o=0;h<1&&(o=0===e?fi(p):ss(v,e,r));const s=Math.abs(o)<=n,l=Math.abs(i-r)<=t;a.done=s&&l}return a.value=a.done?i:r,a}}}function ms({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],d={done:!1,value:f},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=f+h,y=void 0===a?m:a(m);y!==m&&(h=y-f);const g=e=>-h*Math.exp(-e/r),v=e=>y+g(e),b=e=>{const t=g(e),n=v(e);d.done=Math.abs(t)<=c,d.value=d.done?y:n};let x,w;const _=e=>{(e=>void 0!==s&&e<s||void 0!==l&&e>l)(d.value)&&(x=e,w=hs({keyframes:[d.value,p(d.value)],velocity:ss(v,e,d.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return _(0),{calculatedDuration:null,next:e=>{let t=!1;return!w&&void 0===x&&(t=!0,b(e),_(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),d)}}}const ys=Pi(.42,0,1,1),gs=Pi(0,0,.58,1),vs=Pi(.42,0,.58,1),bs=e=>Array.isArray(e)&&"number"==typeof e[0],xs={linear:xi,easeIn:ys,easeInOut:vs,easeOut:gs,circIn:Ii,circInOut:Li,circOut:Ri,backIn:Mi,backInOut:Ni,backOut:Ai,anticipate:Di},ws=e=>{if(bs(e)){Fi(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Pi(t,n,r,o)}return"string"==typeof e?(Fi(void 0!==xs[e],`Invalid easing type '${e}'`),xs[e]):e},_s=(e,t)=>n=>t(e(n)),Ss=(...e)=>e.reduce(_s),Os=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},ks=(e,t,n)=>e+(t-e)*n;function js(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Es(e,t){return n=>n>0?t:e}const Ps=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Cs=[Ca,Pa,Ta];function Ts(e){const t=(e=>Cs.find((t=>t.test(e))))(e);if(Bi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Ta&&(n=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=js(s,r,e+1/3),i=js(s,r,e),a=js(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(n)),n}const As=(e,t)=>{const n=Ts(e),r=Ts(t);if(!n||!r)return Es(e,t);const o={...n};return e=>(o.red=Ps(n.red,r.red,e),o.green=Ps(n.green,r.green,e),o.blue=Ps(n.blue,r.blue,e),o.alpha=ks(n.alpha,r.alpha,e),Pa.transform(o))},Ms=new Set(["none","hidden"]);function Ns(e,t){return n=>ks(e,t,n)}function Ds(e){return"number"==typeof e?Ns:"string"==typeof e?Ki(e)?Es:Aa.test(e)?As:Ls:Array.isArray(e)?Is:"object"==typeof e?Aa.test(e)?As:Rs:Es}function Is(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>Ds(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Rs(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Ds(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Ls=(e,t)=>{const n=Fa.createTransformer(t),r=Ra(e),o=Ra(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Ms.has(e)&&!o.values.length||Ms.has(t)&&!r.values.length?function(e,t){return Ms.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Ss(Is(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(Bi(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Es(e,t))};function zs(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?ks(e,t,n):Ds(e)(e,t)}function Bs(e,t){return e.map((()=>t||vs)).splice(0,e.length-1)}function Fs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(ws):ws(r),i={done:!1,value:t[0]},a=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Os(0,t,r);e.push(ks(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Fi(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&e[0]===e[1])return()=>t[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||zs,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||xi:t;i=Ss(e,i)}r.push(i)}return r}(t,r,o),s=a.length,l=t=>{let n=0;if(s>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Os(e[n],e[n+1],t);return a[n](r)};return n?t=>l(Xi(e[0],e[i-1],t)):l}(a,t,{ease:Array.isArray(o)?o:Bs(t,o)});return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const Ws=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Si.update(t,!0),stop:()=>Oi(t),now:()=>ki.isProcessing?ki.timestamp:rs.now()}},Vs={decay:ms,inertia:ms,tween:Fs,keyframes:Fs,spring:hs},$s=e=>e/100;class Us extends is{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||wa;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,a=es(t)?t:Vs[t]||Fs;let s,l;a!==Fs&&"number"!=typeof e[0]&&(s=Ss($s,zs(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});"mirror"===o&&(l=a({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=function(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(c));const{calculatedDuration:u}=c,f=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:f,totalDuration:f*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:f,repeat:d,repeatType:p,repeatDelay:h,onUpdate:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),g=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let v=this.currentTime,b=o;if(d){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,d+1),!!(t%2)&&("reverse"===p?(n=1-n,h&&(n-=h/u)):"mirror"===p&&(b=i)),v=Xi(0,1,n)*u}const x=g?{done:!1,value:s[0]}:b.next(v);a&&(x.value=a(x.value));let{done:w}=x;!g&&null!==l&&(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const _=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return _&&void 0!==r&&(x.value=bi(s,this.options,r)),m&&m(x.value),_&&this.finish(),x}get duration(){const{resolved:e}=this;return e?di(e.calculatedDuration):0}get time(){return di(this.currentTime)}set time(e){e=fi(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=di(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=Ws,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=n??this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Ks=new Set(["opacity","clipPath","filter","transform"]);function qs(e){let t;return()=>(void 0===t&&(t=e()),t)}const Hs={linearEasing:void 0};function Ys(e,t){const n=qs(e);return()=>{var e;return null!==(e=Hs[t])&&void 0!==e?e:n()}}const Xs=Ys((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0}),"linearEasing");function Gs(e){return!!("function"==typeof e&&Xs()||!e||"string"==typeof e&&(e in Js||Xs())||bs(e)||Array.isArray(e)&&e.every(Gs))}const Zs=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Js={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Zs([0,.65,.55,1]),circOut:Zs([.55,0,1,.45]),backIn:Zs([.31,.01,.66,-.59]),backOut:Zs([.33,1.53,.69,.99])};function Qs(e,t){if(e)return"function"==typeof e&&Xs()?((e,t)=>{let n="";const r=Math.max(Math.round(t/10),2);for(let t=0;t<r;t++)n+=e(Os(0,r-1,t))+", ";return`linear(${n.substring(0,n.length-2)})`})(e,t):bs(e)?Zs(e):Array.isArray(e)?e.map((e=>Qs(e,t)||Js.easeOut)):Js[e]}function el(e,t){e.timeline=t,e.onfinish=null}const tl=qs((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),nl={anticipate:Di,backInOut:Ni,circInOut:Li};class rl extends is{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Qa(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){var n;let{duration:r=300,times:o,ease:i,type:a,motionValue:s,name:l,startTime:c}=this.options;if(null===(n=s.owner)||void 0===n||!n.current)return!1;if("string"==typeof i&&Xs()&&i in nl&&(i=nl[i]),function(e){return es(e.type)||"spring"===e.type||!Gs(e.ease)}(this.options)){const{onComplete:t,onUpdate:n,motionValue:s,element:l,...c}=this.options,u=function(e,t){const n=new Us({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),r=u.duration,o=u.times,i=u.ease,a="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=Qs(s,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"})}(s.owner.current,l,e,{...this.options,duration:r,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(el(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(bi(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:a,ease:i,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return di(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return di(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=fi(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return xi;const{animation:n}=t;el(n,e)}else this.pendingTimeline=e;return xi}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:a}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,u=new Us({...c,keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0}),f=fi(this.time);e.setWithVelocity(u.sample(f-10).value,u.sample(f).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a}=e;return tl()&&n&&Ks.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}const ol=qs((()=>void 0!==window.ScrollTimeline));class il{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}then(e,t){return Promise.all(this.animations).then(e).catch(t)}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>ol()&&n.attachTimeline?n.attachTimeline(e):t(n)));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}const al=(e,t,n,r={},o,i)=>a=>{const s=gi(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=fi(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:a,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(s)||(u={...u,...yi(e,u)}),u.duration&&(u.duration=fi(u.duration)),u.repeatDelay&&(u.repeatDelay=fi(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let f=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(f=!0)),f&&!i&&void 0!==t.get()){const e=bi(u.keyframes,s);if(void 0!==e)return Si.update((()=>{u.onUpdate(e),u.onComplete()})),new il([])}return!i&&rl.supports(u)?new rl(u):new Us(u)},sl=e=>ti(e)?e[e.length-1]||0:e;function ll(e,t){-1===e.indexOf(t)&&e.push(t)}function cl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class ul{constructor(){this.subscriptions=[]}add(e){return ll(this.subscriptions,e),()=>cl(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}class fl{constructor(e,t={}){this.version="11.11.17",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=rs.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=rs.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ul);const n=this.events[e].add(t);return"change"===e?()=>{n(),Si.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=rs.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return as(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function dl(e,t){return new fl(e,t)}function pl(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,dl(n))}const hl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ml="data-"+hl("framerAppearId");function yl(e){return e.props[ml]}const gl=e=>!(!e||!e.getVelocity);function vl(e,t){const n=e.getValue("willChange");if(function(e){return!(!gl(e)||!e.add)}(n))return n.add(t)}function bl({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function xl(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(a=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&bl(u,t))continue;const s={delay:n,...gi(a||{},t)};let f=!1;if(window.MotionHandoffAnimation){const n=yl(e);if(n){const e=window.MotionHandoffAnimation(n,t,Si);null!==e&&(s.startTime=e,f=!0)}}vl(e,t),r.start(al(t,r,o,e.shouldReduceMotion&&ui.has(t)?{type:!1}:s,e,f));const d=r.animation;d&&c.push(d)}return s&&Promise.all(c).then((()=>{Si.update((()=>{s&&function(e,t){const n=ai(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)pl(e,t,sl(i[t]))}(e,s)}))})),c}function wl(e,t,n={}){var r;const o=ai(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const a=o?()=>Promise.all(xl(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:a,staggerDirection:s}=i;return function(e,t,n=0,r=0,o=1,i){const a=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(_l).forEach(((e,r)=>{e.notify("AnimationStart",t),a.push(wl(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(a)}(e,t,o+r,a,s,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function _l(e,t){return e.sortNodePosition(t)}const Sl=li.length;function Ol(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ol(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Sl;n++){const r=li[n],o=e.props[r];(ri(o)||!1===o)&&(t[r]=o)}return t}const kl=[...si].reverse(),jl=si.length;function El(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>wl(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=wl(e,t,n);else{const o="function"==typeof t?ai(e,t,n.custom):t;r=Promise.all(xl(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Tl(),r=!0;const o=t=>(n,r)=>{var o;const i=ai(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:a}=e,s=Ol(e.parent)||{},l=[],c=new Set;let u={},f=1/0;for(let t=0;t<jl;t++){const d=kl[t],p=n[d],h=void 0!==a[d]?a[d]:s[d],m=ri(h),y=d===i?p.isActive:null;!1===y&&(f=t);let g=h===s[d]&&h!==a[d]&&m;if(g&&r&&e.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...u},!p.isActive&&null===y||!h&&!p.prevProp||ei(h)||"boolean"==typeof h)continue;const v=Pl(p.prevProp,h);let b=v||d===i&&p.isActive&&!g&&m||t>f&&m,x=!1;const w=Array.isArray(h)?h:[h];let _=w.reduce(o(d),{});!1===y&&(_={});const{prevResolvedValues:S={}}=p,O={...S,..._},k=t=>{b=!0,c.has(t)&&(x=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in O){const t=_[e],n=S[e];if(u.hasOwnProperty(e))continue;let r=!1;r=ti(t)&&ti(n)?!ni(t,n):t!==n,r?null!=t?k(e):c.add(e):void 0!==t&&c.has(e)?k(e):p.protectedKeys[e]=!0}p.prevProp=h,p.prevResolvedValues=_,p.isActive&&(u={...u,..._}),r&&e.blockInitialAnimation&&(b=!1),b&&(!g||!v||x)&&l.push(...w.map((e=>({animation:e,options:{type:d}}))))}if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null})),l.push({animation:t})}let d=!!l.length;return r&&(!1===a.initial||a.initial===a.animate)&&!e.manuallyAnimateOnMount&&(d=!1),r=!1,d?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Tl(),r=!0}}}function Pl(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!ni(t,e)}function Cl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tl(){return{animate:Cl(!0),whileInView:Cl(),whileHover:Cl(),whileTap:Cl(),whileDrag:Cl(),whileFocus:Cl(),exit:Cl()}}class Al{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Ml=0;const Nl={animation:{Feature:class extends Al{constructor(e){super(e),e.animationState||(e.animationState=El(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ei(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Al{constructor(){super(...arguments),this.id=Ml++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},Dl=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Il(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function Rl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Ll(e,t,n,r){return Rl(e,t,(e=>t=>Dl(t)&&e(t,Il(t)))(n),r)}const zl=(e,t)=>Math.abs(e-t);class Bl{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Vl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=zl(e.x,t.x),r=zl(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=ki;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Fl(t,this.transformPagePoint),Si.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=Vl("pointercancel"===e.type?this.lastMoveEventInfo:Fl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Dl(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=Fl(Il(e),this.transformPagePoint),{point:a}=i,{timestamp:s}=ki;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Vl(i,this.history)),this.removeListeners=Ss(Ll(this.contextWindow,"pointermove",this.handlePointerMove),Ll(this.contextWindow,"pointerup",this.handlePointerUp),Ll(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Oi(this.updatePoint)}}function Fl(e,t){return t?{point:t(e.point)}:e}function Wl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Vl({point:e},t){return{point:e,delta:Wl(e,Ul(t)),offset:Wl(e,$l(t)),velocity:Kl(t,.1)}}function $l(e){return e[0]}function Ul(e){return e[e.length-1]}function Kl(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ul(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>fi(t)));)n--;if(!r)return{x:0,y:0};const i=di(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function ql(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const Hl=ql("dragHorizontal"),Yl=ql("dragVertical");function Xl(e){let t=!1;if("y"===e)t=Yl();else if("x"===e)t=Hl();else{const e=Hl(),n=Yl();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Gl(){const e=Xl(!0);return!e||(e(),!1)}function Zl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Jl(e){return e.max-e.min}function Ql(e,t,n,r=.5){e.origin=r,e.originPoint=ks(t.min,t.max,e.origin),e.scale=Jl(n)/Jl(t),e.translate=ks(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function ec(e,t,n,r){Ql(e.x,t.x,n.x,r?r.originX:void 0),Ql(e.y,t.y,n.y,r?r.originY:void 0)}function tc(e,t,n){e.min=n.min+t.min,e.max=e.min+Jl(t)}function nc(e,t,n){e.min=t.min-n.min,e.max=e.min+Jl(t)}function rc(e,t,n){nc(e.x,t.x,n.x),nc(e.y,t.y,n.y)}function oc(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function ic(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const ac=.35;function sc(e,t,n){return{min:lc(e,t),max:lc(e,n)}}function lc(e,t){return"number"==typeof e?e:e[t]||0}const cc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function uc(e){return[e("x"),e("y")]}function fc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function dc(e){return void 0===e||1===e}function pc({scale:e,scaleX:t,scaleY:n}){return!dc(e)||!dc(t)||!dc(n)}function hc(e){return pc(e)||mc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function mc(e){return yc(e.x)||yc(e.y)}function yc(e){return e&&"0%"!==e}function gc(e,t,n){return n+t*(e-n)}function vc(e,t,n,r,o){return void 0!==o&&(e=gc(e,o,r)),gc(e,n,r)+t}function bc(e,t=0,n=1,r,o){e.min=vc(e.min,t,n,r,o),e.max=vc(e.max,t,n,r,o)}function xc(e,{x:t,y:n}){bc(e.x,t.translate,t.scale,t.originPoint),bc(e.y,n.translate,n.scale,n.originPoint)}const wc=.999999999999,_c=1.0000000000001;function Sc(e,t){e.min=e.min+t,e.max=e.max+t}function Oc(e,t,n,r,o=.5){bc(e,t,n,ks(e.min,e.max,o),r)}function kc(e,t){Oc(e.x,t.x,t.scaleX,t.scale,t.originX),Oc(e.y,t.y,t.scaleY,t.scale,t.originY)}function jc(e,t){return fc(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Ec=({current:e})=>e?e.ownerDocument.defaultView:null,Pc=new WeakMap;class Cc{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Bl(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Il(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Xl(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),uc((e=>{let t=this.getAxisMotionValue(e).get()||0;if(ta.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Jl(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&Si.postRender((()=>o(e,t))),vl(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>uc((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Ec(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Si.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Tc(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?ks(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?ks(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&Zl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:oc(e.x,n,o),y:oc(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=ac){return!1===e?e=0:!0===e&&(e=ac),{x:sc(e,"left","right"),y:sc(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&uc((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Zl(e))return!1;const n=e.current;Fi(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=jc(e,n),{scroll:o}=t;return o&&(Sc(r.x,o.offset.x),Sc(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:ic(e.x,t.x),y:ic(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=fc(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=uc((a=>{if(!Tc(a,t,this.currentDirection))return;let l=s&&s[a]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,f={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,f)}));return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return vl(this.visualElement,e),n.start(al(e,n,0,t,this.visualElement,!1))}stopAnimation(){uc((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){uc((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){uc((t=>{const{drag:n}=this.getProps();if(!Tc(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-ks(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Zl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};uc((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Jl(e),o=Jl(t);return o>r?n=Os(t.min,t.max-r,e.min):r>o&&(n=Os(e.min,e.max-o,t.min)),Xi(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),uc((t=>{if(!Tc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(ks(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Pc.set(this.visualElement,this);const e=Ll(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Zl(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Si.read(t);const o=Rl(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(uc((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=ac,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function Tc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Ac=e=>(t,n)=>{e&&Si.postRender((()=>e(t,n)))},Mc=(0,f.createContext)(null),Nc=(0,f.createContext)({}),Dc=(0,f.createContext)({}),Ic={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Rc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Lc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!na.test(e))return e;e=parseFloat(e)}return`${Rc(e,t.target.x)}% ${Rc(e,t.target.y)}%`}},zc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Fa.parse(e);if(o.length>5)return r;const i=Fa.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=ks(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},Bc={},{schedule:Fc,cancel:Wc}=_i(queueMicrotask,!1);class Vc extends f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=Uc,Object.assign(Bc,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Ic.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i&&(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Si.postRender((()=>{const e=i.getStack();(!e||!e.members.length)&&this.safeToRemove()})))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Fc.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function $c(e){const[t,n]=function(){const e=(0,f.useContext)(Mc);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,o=(0,f.useId)();(0,f.useEffect)((()=>r(o)),[]);const i=(0,f.useCallback)((()=>n&&n(o)),[o,n]);return!t&&n?[!1,i]:[!0]}(),r=(0,f.useContext)(Nc);return(0,u.jsx)(Vc,{...e,layoutGroup:r,switchLayoutGroup:(0,f.useContext)(Dc),isPresent:t,safeToRemove:n})}const Uc={borderRadius:{...Lc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Lc,borderTopRightRadius:Lc,borderBottomLeftRadius:Lc,borderBottomRightRadius:Lc,boxShadow:zc},Kc=["TopLeft","TopRight","BottomLeft","BottomRight"],qc=Kc.length,Hc=e=>"string"==typeof e?parseFloat(e):e,Yc=e=>"number"==typeof e||na.test(e);function Xc(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Gc=Jc(0,.5,Ri),Zc=Jc(.5,.95,xi);function Jc(e,t,n){return r=>r<e?0:r>t?1:n(Os(e,t,r))}function Qc(e,t){e.min=t.min,e.max=t.max}function eu(e,t){Qc(e.x,t.x),Qc(e.y,t.y)}function tu(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function nu(e,t,n,r,o){return e=gc(e-=t,1/n,r),void 0!==o&&(e=gc(e,1/o,r)),e}function ru(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){if(ta.test(t)&&(t=parseFloat(t),t=ks(a.min,a.max,t/100)-a.min),"number"!=typeof t)return;let s=ks(i.min,i.max,r);e===i&&(s-=t),e.min=nu(e.min,t,n,s,o),e.max=nu(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ou=["x","scaleX","originX"],iu=["y","scaleY","originY"];function au(e,t,n,r){ru(e.x,t,ou,n?n.x:void 0,r?r.x:void 0),ru(e.y,t,iu,n?n.y:void 0,r?r.y:void 0)}function su(e){return 0===e.translate&&1===e.scale}function lu(e){return su(e.x)&&su(e.y)}function cu(e,t){return e.min===t.min&&e.max===t.max}function uu(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function fu(e,t){return uu(e.x,t.x)&&uu(e.y,t.y)}function du(e){return Jl(e.x)/Jl(e.y)}function pu(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class hu{constructor(){this.members=[]}add(e){ll(this.members,e),e.scheduleRender()}remove(e){if(cl(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const mu=(e,t)=>e.depth-t.depth;class yu{constructor(){this.children=[],this.isDirty=!1}add(e){ll(this.children,e),this.isDirty=!0}remove(e){cl(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(mu),this.isDirty=!1,this.children.forEach(e)}}function gu(e){const t=gl(e)?e.get():e;return(e=>!!(e&&"object"==typeof e&&e.mix&&e.toValue))(t)?t.toValue():t}const vu={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},bu=typeof window<"u"&&void 0!==window.MotionDebug,xu=["","X","Y","Z"],wu={visibility:"hidden"};let _u=0;function Su(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ou(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=yl(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Si,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ou(r)}function ku({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=_u++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,bu&&(vu.totalNodes=vu.resolvedTargetDeltas=vu.recalculatedProjection=0),this.nodes.forEach(Pu),this.nodes.forEach(Iu),this.nodes.forEach(Ru),this.nodes.forEach(Cu),bu&&window.MotionDebug.record(vu)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new yu)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ul),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=function(e){return e instanceof SVGElement&&"svg"!==e.tagName}(t),this.instance=t;const{layoutId:r,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||r)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e){const t=rs.now(),n=({timestamp:r})=>{const o=r-t;o>=250&&(Oi(n),e(o-250))};return Si.read(n,!0),()=>Oi(n)}(r),Ic.hasAnimatedSinceResize&&(Ic.hasAnimatedSinceResize=!1,this.nodes.forEach(Du))}))}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||o)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||Vu,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!fu(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...gi(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Du(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Oi(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Lu),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ou(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Au);this.isUpdating||this.nodes.forEach(Mu),this.isUpdating=!1,this.nodes.forEach(Nu),this.nodes.forEach(ju),this.nodes.forEach(Eu),this.clearAllSnapshots();const e=rs.now();ki.delta=Xi(0,1e3/60,e-ki.timestamp),ki.timestamp=e,ki.isProcessing=!0,ji.update.process(ki),ji.preRender.process(ki),ji.render.process(ki),ki.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Tu),this.sharedNodes.forEach(zu)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Si.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Si.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=!(!this.options.layoutScroll||!this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!lu(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||hc(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),function(e){Ku(e.x),Ku(e.y)}(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(Hu)){const{scroll:e}=this.root;e&&(Sc(n.x,e.offset.x),Sc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(eu(n,e),null!==(t=this.scroll)&&void 0!==t&&t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&eu(n,e),Sc(n.x,o.offset.x),Sc(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};eu(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&kc(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),hc(r.latestValues)&&kc(n,r.latestValues)}return hc(this.latestValues)&&kc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};eu(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance||!hc(n.latestValues))continue;pc(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};eu(r,n.measurePageBox()),au(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return hc(this.latestValues)&&au(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ki.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=!!this.resumingFrom||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||null!==(t=this.parent)&&void 0!==t&&t.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=ki.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},rc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),eu(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),function(e,t,n){tc(e.x,t.x,n.x),tc(e.y,t.y,n.y)}(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):eu(this.target,this.layout.layoutBox),xc(this.target,this.targetDelta)):eu(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},rc(this.relativeTargetOrigin,this.target,e.target),eu(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}bu&&vu.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!pc(this.parent.latestValues)&&!mc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!(!(this.relativeTarget||this.targetDelta||this.options.layoutRoot)||!this.layout)}calcProjection(){var e;const t=this.getLead(),n=!!this.resumingFrom||this!==t;let r=!0;if((this.isProjectionDirty||!(null===(e=this.parent)||void 0===e)&&e.isProjectionDirty)&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===ki.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;eu(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,s=this.treeScale.y;(function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&kc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,xc(e,a)),r&&hc(i.latestValues)&&kc(e,i.latestValues))}t.x<_c&&t.x>wc&&(t.x=1),t.y<_c&&t.y>wc&&(t.y=1)})(this.layoutCorrected,this.treeScale,this.path,n),t.layout&&!t.target&&(1!==this.treeScale.x||1!==this.treeScale.y)&&(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(tu(this.prevProjectionDelta.x,this.projectionDelta.x),tu(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ec(this.projectionDelta,this.layoutCorrected,l,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==s||!pu(this.projectionDelta.x,this.prevProjectionDelta.x)||!pu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),bu&&vu.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=!(!s||c||!0!==this.options.crossfade||this.path.some(Wu));let f;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Bu(i.x,e.x,n),Bu(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rc(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Fu(e.x,t.x,n.x,r),Fu(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),f&&function(e,t){return cu(e.x,t.x)&&cu(e.y,t.y)}(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||(f={x:{min:0,max:0},y:{min:0,max:0}}),eu(f,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=ks(0,void 0!==n.opacity?n.opacity:1,Gc(r)),e.opacityExit=ks(void 0!==t.opacity?t.opacity:1,0,Zc(r))):i&&(e.opacity=ks(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<qc;o++){const i=`border${Kc[o]}Radius`;let a=Xc(t,i),s=Xc(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Yc(a)===Yc(s)?(e[i]=Math.max(ks(Hc(a),Hc(s),r),0),(ta.test(s)||ta.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=ks(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Oi(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Si.update((()=>{Ic.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=gl(0)?0:dl(0);return r.start(al("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&qu(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Jl(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Jl(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}eu(t,n),kc(t,o),ec(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new hu),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Su("z",e,r,this.animationValues);for(let t=0;t<xu.length;t++)Su(`rotate${xu[t]}`,e,r,this.animationValues),Su(`skew${xu[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return wu;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=gu(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=gu(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!hc(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const a=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null==n?void 0:n.z)||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),(1!==t.x||1!==t.y)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(1!==s||1!==l)&&(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a),o&&(r.transform=o(a,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=a.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:r.opacity=i===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const e in Bc){if(void 0===a[e])continue;const{correct:t,applyTo:n}=Bc[e],o="none"===r.transform?a[e]:t(a[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?gu(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Au),this.root.sharedNodes.clear()}}}function ju(e){e.updateLayout()}function Eu(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?uc((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=Jl(r);r.min=t[e].min,r.max=r.min+o})):qu(o,n.layoutBox,t)&&uc((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],a=Jl(t[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)}));const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};ec(a,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?ec(s,e.applyTransform(r,!0),n.measuredBox):ec(s,t,n.layoutBox);const l=!lu(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a={x:{min:0,max:0},y:{min:0,max:0}};rc(a,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};rc(s,t,i.layoutBox),fu(a,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=a,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Pu(e){bu&&vu.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Cu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Tu(e){e.clearSnapshot()}function Au(e){e.clearMeasurements()}function Mu(e){e.isLayoutDirty=!1}function Nu(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Du(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Iu(e){e.resolveTargetDelta()}function Ru(e){e.calcProjection()}function Lu(e){e.resetSkewAndRotation()}function zu(e){e.removeLeadSnapshot()}function Bu(e,t,n){e.translate=ks(t.translate,0,n),e.scale=ks(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Fu(e,t,n,r){e.min=ks(t.min,n.min,r),e.max=ks(t.max,n.max,r)}function Wu(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Vu={duration:.45,ease:[.4,0,.1,1]},$u=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Uu=$u("applewebkit/")&&!$u("chrome/")?Math.round:xi;function Ku(e){e.min=Uu(e.min),e.max=Uu(e.max)}function qu(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){return Math.abs(e-t)<=.2}(du(t),du(n))}function Hu(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Yu=ku({attachResizeListener:(e,t)=>Rl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xu={current:void 0},Gu=ku({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Xu.current){const e=new Yu({});e.mount(window),e.setOptions({layoutScroll:!0}),Xu.current=e}return Xu.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>"fixed"===window.getComputedStyle(e).position}),Zu={pan:{Feature:class extends Al{constructor(){super(...arguments),this.removePointerDownListener=xi}onPointerDown(e){this.session=new Bl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ec(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ac(e),onStart:Ac(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Si.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Ll(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Al{constructor(e){super(e),this.removeGroupControls=xi,this.removeListeners=xi,this.controls=new Cc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||xi}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Gu,MeasureLayout:$c}};function Ju(e,t){const n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Ll(e.current,n,((n,o)=>{if("touch"===n.pointerType||Gl())return;const i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);const a=i[r];a&&Si.postRender((()=>a(n,o)))}),{passive:!e.getProps()[r]})}const Qu=(e,t)=>!!t&&(e===t||Qu(e,t.parentElement));function ef(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Il(n))}const tf=new WeakMap,nf=new WeakMap,rf=e=>{const t=tf.get(e.target);t&&t(e)},of=e=>{e.forEach(rf)};const af={some:0,all:1},sf={inView:{Feature:class extends Al{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:af[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;nf.has(n)||nf.set(n,{});const r=nf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(of,{root:e,...t})),r[o]}(t);return tf.set(e,n),r.observe(e),()=>{tf.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,o&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Al{constructor(){super(...arguments),this.removeStartListeners=xi,this.removeEndListeners=xi,this.removeAccessibleListeners=xi,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),r=Ll(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r,globalTapTarget:o}=this.node.getProps(),i=o||Qu(this.node.current,e.target)?n:r;i&&Si.update((()=>i(e,t)))}),{passive:!(n.onTap||n.onPointerUp)}),o=Ll(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Ss(r,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Rl(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Rl(this.node.current,"keyup",(e=>{"Enter"!==e.key||!this.checkPressEnd()||ef("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&Si.postRender((()=>n(e,t)))}))})),ef("down",((e,t)=>{this.startPress(e,t)})))})),t=Rl(this.node.current,"blur",(()=>{this.isPressing&&ef("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Ss(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Si.postRender((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Gl()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Si.postRender((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Ll(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Rl(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ss(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Al{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ss(Rl(this.node.current,"focus",(()=>this.onFocus())),Rl(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Al{mount(){this.unmount=Ss(Ju(this.node,!0),Ju(this.node,!1))}unmount(){}}}},lf={layout:{ProjectionNode:Gu,MeasureLayout:$c}},cf=(0,f.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),uf=(0,f.createContext)({}),ff=typeof window<"u",df=ff?f.useLayoutEffect:f.useEffect,pf=(0,f.createContext)({strict:!1});function hf(e,t,n,r,o){var i,a;const{visualElement:s}=(0,f.useContext)(uf),l=(0,f.useContext)(pf),c=(0,f.useContext)(Mc),u=(0,f.useContext)(cf).reducedMotion,d=(0,f.useRef)();r=r||l.renderer,!d.current&&r&&(d.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:u}));const p=d.current,h=(0,f.useContext)(Dc);p&&!p.projection&&o&&("html"===p.type||"svg"===p.type)&&function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mf(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!a||s&&Zl(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(d.current,n,o,h);const m=(0,f.useRef)(!1);(0,f.useInsertionEffect)((()=>{p&&m.current&&p.update(n,c)}));const y=n[ml],g=(0,f.useRef)(!!y&&!(null!==(i=window.MotionHandoffIsComplete)&&void 0!==i&&i.call(window,y))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,y)));return df((()=>{p&&(m.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Fc.render(p.render),g.current&&p.animationState&&p.animationState.animateChanges())})),(0,f.useEffect)((()=>{p&&(!g.current&&p.animationState&&p.animationState.animateChanges(),g.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,y)})),g.current=!1))})),p}function mf(e){if(e)return!1!==e.options.allowProjection?e.projection:mf(e.parent)}function yf(e,t,n){return(0,f.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):Zl(n)&&(n.current=r))}),[t])}function gf(e){return ei(e.animate)||li.some((t=>ri(e[t])))}function vf(e){return!(!gf(e)&&!e.variants)}function bf(e){return Array.isArray(e)?e.join(" "):e}const xf={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},wf={};for(const e in xf)wf[e]={isEnabled:t=>xf[e].some((e=>!!t[e]))};const _f=Symbol.for("motionComponentSymbol");function Sf({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&function(e){for(const t in e)wf[t]={...wf[t],...e[t]}}(e);const i=(0,f.forwardRef)((function(e,i){let a;const s={...(0,f.useContext)(cf),...e,layoutId:Of(e)},{isStatic:l}=s,c=function(e){const{initial:t,animate:n}=function(e,t){if(gf(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ri(t)?t:void 0,animate:ri(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,f.useContext)(uf));return(0,f.useMemo)((()=>({initial:t,animate:n})),[bf(t),bf(n)])}(e),d=r(e,l);if(!l&&ff){(0,f.useContext)(pf).strict;const e=function(e){const{drag:t,layout:n}=wf;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:null!=t&&t.isEnabled(e)||null!=n&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(s);a=e.MeasureLayout,c.visualElement=hf(o,d,s,t,e.ProjectionNode)}return(0,u.jsxs)(uf.Provider,{value:c,children:[a&&c.visualElement?(0,u.jsx)(a,{visualElement:c.visualElement,...s}):null,n(o,e,yf(d,c.visualElement,i),d,l,c.visualElement)]})}));return i[_f]=o,i}function Of({layoutId:e}){const t=(0,f.useContext)(Nc).id;return t&&void 0!==e?t+"-"+e:e}const kf=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function jf(e){return"string"==typeof e&&!e.includes("-")&&!!(kf.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ef(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Pf=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Cf(e,t,n,r){Ef(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Pf.has(n)?n:hl(n),t.attrs[n])}function Tf(e,{layout:t,layoutId:n}){return ui.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Bc[e]||"opacity"===e)}function Af(e,t,n){var r;const{style:o}=e,i={};for(const a in o)(gl(o[a])||t.style&&gl(t.style[a])||Tf(a,e)||void 0!==(null===(r=null==n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return i}function Mf(e,t,n){const r=Af(e,t,n);for(const n in e)(gl(e[n])||gl(t[n]))&&(r[-1!==ci.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}function Nf(e){const t=(0,f.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Df=e=>(t,n)=>{const r=(0,f.useContext)(uf),o=(0,f.useContext)(Mc),i=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,o,i){const a={latestValues:If(r,o,i,e),renderState:t()};return n&&(a.mount=e=>n(r,e,a)),a}(e,t,r,o);return n?i():Nf(i)};function If(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=gu(i[e]);let{initial:a,animate:s}=e;const l=gf(e),c=vf(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const f=u?s:a;if(f&&"boolean"!=typeof f&&!ei(f)){const t=Array.isArray(f)?f:[f];for(let n=0;n<t.length;n++){const r=ii(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Rf=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Lf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},zf=ci.length;function Bf(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(ui.has(e))a=!0;else if($i(e))o[e]=n;else{const t=Rf(n,Ya[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<zf;i++){const a=ci[i],s=e[a];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Rf(s,Ya[a]);l||(o=!1,r+=`${Lf[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function Ff(e,t,n){return"string"==typeof e?e:na.transform(t+n*e)}const Wf={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vf={offset:"strokeDashoffset",array:"strokeDasharray"};function $f(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:l=0,...c},u,f){if(Bf(e,c,f),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:p,dimensions:h}=e;d.transform&&(h&&(p.transform=d.transform),delete d.transform),h&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Ff(t,e.x,e.width)} ${Ff(n,e.y,e.height)}`}(h,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==a&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Wf:Vf;e[i.offset]=na.transform(-r);const a=na.transform(t),s=na.transform(n);e[i.array]=`${a} ${s}`}(d,a,s,l,!1)}const Uf=e=>"string"==typeof e&&"svg"===e.toLowerCase(),Kf={useVisualState:Df({scrapeMotionValuesFromProps:Mf,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onMount:(e,t,{renderState:n,latestValues:r})=>{Si.read((()=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}})),Si.render((()=>{$f(n,r,Uf(t.tagName),e.transformTemplate),Cf(t,n)}))}})},qf={useVisualState:Df({scrapeMotionValuesFromProps:Af,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Hf(e,t,n){for(const r in t)!gl(t[r])&&!Tf(r,n)&&(e[r]=t[r])}function Yf(e,t){const n={},r=function(e,t){const n={};return Hf(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,f.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Bf(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Xf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Gf(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Xf.has(e)}let Zf=e=>!Gf(e);try{(Jf=require("@emotion/is-prop-valid").default)&&(Zf=e=>e.startsWith("on")?!Gf(e):Jf(e))}catch{}var Jf;function Qf(e,t,n,r){const o=(0,f.useMemo)((()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return $f(n,t,Uf(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Hf(t,e.style,e),o.style={...t,...o.style}}return o}function ed(e=!1){return(t,n,r,{latestValues:o},i)=>{const a=(jf(t)?Qf:Yf)(n,o,i,t),s=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(Zf(o)||!0===n&&Gf(o)||!t&&!Gf(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),l=t!==f.Fragment?{...s,...a,ref:r}:{},{children:c}=n,u=(0,f.useMemo)((()=>gl(c)?c.get():c),[c]);return(0,f.createElement)(t,{...l,children:u})}}function td(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Sf({...jf(n)?Kf:qf,preloadedFeatures:e,useRender:ed(r),createVisualElement:t,Component:n})}}const nd={current:null},rd={current:!1},od=new WeakMap,id=[...ha,Aa,Fa],ad=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sd{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=wa,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=rs.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Si.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=gf(t),this.isVariantNode=vf(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!(!e||!e.current);const{willChange:c,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&gl(t)&&t.set(s[e],!1)}}mount(e){this.current=e,od.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),rd.current||function(){if(rd.current=!0,ff)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>nd.current=e.matches;e.addListener(t),t()}else nd.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||nd.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){od.delete(this.current),this.projection&&this.projection.unmount(),Oi(this.notifyUpdate),Oi(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=ui.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Si.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in wf){const t=wf[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ad.length;t++){const n=ad[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(gl(o))e.addValue(r,o);else if(gl(i))e.addValue(r,dl(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,dl(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=dl(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Wi(r)||zi(r))?r=parseFloat(r):!(e=>id.find(pa(e)))(r)&&Fa.test(t)&&(r=Za(e,t)),this.setBaseTarget(e,gl(r)?r.get():r)),gl(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=ii(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||gl(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new ul),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class ld extends sd{constructor(){super(...arguments),this.KeyframeResolver=Qa}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}}class cd extends ld{constructor(){super(...arguments),this.type="html",this.renderInstance=Ef}readValueFromInstance(e,t){if(ui.has(t)){const e=Ga(t);return e&&e.default||0}{const n=function(e){return window.getComputedStyle(e)}(e),r=($i(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof r?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return jc(e,t)}build(e,t,n){Bf(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Af(e,t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;gl(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class ud extends ld{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=cc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(ui.has(t)){const e=Ga(t);return e&&e.default||0}return t=Pf.has(t)?t:hl(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return Mf(e,t,n)}build(e,t,n){$f(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Cf(e,t,0,r)}mount(e){this.isSVGTag=Uf(e.tagName),super.mount(e)}}const fd=(e,t)=>jf(e)?new ud(t):new cd(t,{allowProjection:e!==f.Fragment}),dd=Qo(td({...Nl,...sf,...Zu,...lf},fd));class pd extends f.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function hd({children:e,isPresent:t}){const n=(0,f.useId)(),r=(0,f.useRef)(null),o=(0,f.useRef)({width:0,height:0,top:0,left:0}),{nonce:i}=(0,f.useContext)(cf);return(0,f.useInsertionEffect)((()=>{const{width:e,height:a,top:s,left:l}=o.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return i&&(c.nonce=i),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}}),[t]),(0,u.jsx)(pd,{isPresent:t,childRef:r,sizeRef:o,children:f.cloneElement(e,{ref:r})})}const md=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const s=Nf(yd),l=(0,f.useId)(),c=(0,f.useCallback)((e=>{s.set(e,!0);for(const e of s.values())if(!e)return;r&&r()}),[s,r]),d=(0,f.useMemo)((()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c,register:e=>(s.set(e,!1),()=>s.delete(e))})),i?[Math.random(),c]:[n,c]);return(0,f.useMemo)((()=>{s.forEach(((e,t)=>s.set(t,!1)))}),[n]),f.useEffect((()=>{!n&&!s.size&&r&&r()}),[n]),"popLayout"===a&&(e=(0,u.jsx)(hd,{isPresent:n,children:e})),(0,u.jsx)(Mc.Provider,{value:d,children:e})};function yd(){return new Map}const gd=e=>e.key||"";function vd(e){const t=[];return f.Children.forEach(e,(e=>{(0,f.isValidElement)(e)&&t.push(e)})),t}const bd=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync"})=>{Fi(!t,"Replace exitBeforeEnter with mode='wait'");const s=(0,f.useMemo)((()=>vd(e)),[e]),l=s.map(gd),c=(0,f.useRef)(!0),d=(0,f.useRef)(s),p=Nf((()=>new Map)),[h,m]=(0,f.useState)(s),[y,g]=(0,f.useState)(s);df((()=>{c.current=!1,d.current=s;for(let e=0;e<y.length;e++){const t=gd(y[e]);l.includes(t)?p.delete(t):!0!==p.get(t)&&p.set(t,!1)}}),[y,l.length,l.join("-")]);const v=[];if(s!==h){let e=[...s];for(let t=0;t<y.length;t++){const n=y[t],r=gd(n);l.includes(r)||(e.splice(t,0,n),v.push(n))}return"wait"===a&&v.length&&(e=v),g(vd(e)),void m(s)}const{forceRender:b}=(0,f.useContext)(Nc);return(0,u.jsx)(u.Fragment,{children:y.map((e=>{const t=gd(e),f=s===y||l.includes(t);return(0,u.jsx)(md,{isPresent:f,initial:!(c.current&&!r)&&void 0,custom:f?void 0:n,presenceAffectsLayout:i,mode:a,onExitComplete:f?void 0:()=>{if(!p.has(t))return;p.set(t,!0);let e=!0;p.forEach((t=>{t||(e=!1)})),e&&(null==b||b(),g(d.current),o&&o())},children:e},t)}))})},xd=(0,f.createContext)(null);const wd=e=>!e.isLayoutDirty&&e.willUpdate(!1);function _d(){const e=new Set,t=new WeakMap,n=()=>e.forEach(wd);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const Sd=e=>!0===e,Od=({children:e,id:t,inherit:n=!0})=>{const r=(0,f.useContext)(Nc),o=(0,f.useContext)(xd),[i,a]=function(){const e=function(){const e=(0,f.useRef)(!1);return df((()=>(e.current=!0,()=>{e.current=!1})),[]),e}(),[t,n]=(0,f.useState)(0),r=(0,f.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,f.useCallback)((()=>Si.postRender(r)),[r]),t]}(),s=(0,f.useRef)(null),l=r.id||o;null===s.current&&((e=>Sd(!0===e)||"id"===e)(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:Sd(n)&&r.group||_d()});const c=(0,f.useMemo)((()=>({...s.current,forceRender:i})),[a]);return(0,u.jsx)(Nc.Provider,{value:c,children:e})},kd=(0,f.createContext)({}),jd=()=>(0,f.useContext)(kd),Ed=(0,f.createContext)(null),Pd=({children:e,activeItem:t=null,onChange:n,className:r,size:o="sm",orientation:i="horizontal",variant:a="pill",iconPosition:s="left",width:l="full"})=>{const c=ke(),d=jd(),p=(null==d?void 0:d.activeItem)||t,h=(0,f.useCallback)(((e,t)=>{n&&n({event:e,value:t})}),[n]);let m,y="rounded-full",g="p-1",v="ring-1 ring-tab-border";"vertical"===i?m="gap-0.5":("rounded"===a||"pill"===a)&&("xs"===o||"sm"===o?m="gap-0.5":("md"===o||"lg"===o)&&(m="gap-1")),"rounded"===a||"vertical"===i?y="rounded-md":"underline"===a&&(y="rounded-none",g="p-0",v="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===o?m="gap-0":"sm"===o?m="gap-2.5":("md"===o||"lg"===o)&&(m="gap-3"));const b=ve(`box-border [&>*]:box-border flex items-center ${"full"===l?"w-full":""} ${"vertical"===i?"flex-col":""}`,y,g,m,v,"underline"!==a?"bg-tab-background":"",r);return(0,u.jsx)("div",{className:b,children:(0,u.jsx)(Ed.Provider,{value:{activeItem:p,onChange:h,size:o,variant:a,orientation:i,iconPosition:s,width:l},children:(0,u.jsx)(Od,{id:c,children:f.Children.map(e,(e=>(0,f.isValidElement)(e)?f.cloneElement(e):null))})})})};Pd.displayName="Tabs.Group";const Cd=(0,f.forwardRef)((({slug:e,text:t,icon:n,className:r,disabled:o=!1,badge:i=null,...a},s)=>{const l=(0,f.useContext)(Ed);if(!l)throw new Error("Tab should be used inside Tabs Group");const{activeItem:c,onChange:d,size:p,variant:h,orientation:m,iconPosition:y,width:g}=l,v={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===h?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===h?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===h?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[p],b=ve("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===g?"flex-1":"","vertical"===m?"w-full justify-between":"");let x="rounded-full";"rounded"===h?x="rounded-md":"underline"===h&&(x="rounded-none");const w=ve(b,"border-none",x,"hover:text-text-primary group","focus:outline-none",v,c===e?"bg-background-primary text-text-primary shadow-sm":"",o?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),_=ve("flex items-center gap-1 group-hover:text-text-primary",o&&"group-hover:text-text-disabled");return(0,u.jsxs)(dd.button,{ref:s,className:w,disabled:o,onClick:n=>{d(n,{slug:e,text:t})},...a,layoutRoot:!0,children:[c===e&&"underline"===h&&(0,u.jsx)(dd.span,{layoutId:"underline",layoutDependency:c,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,u.jsxs)("span",{className:_,children:["left"===y&&n&&(0,u.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,"right"===y&&n&&(0,u.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),i&&(0,f.isValidElement)(i)&&i]})}));Cd.displayName="Tabs.Tab";const Td=({activeItem:e,children:t})=>(0,u.jsx)(kd.Provider,{value:{activeItem:e},children:t}),Ad=({slug:e,children:t})=>{const n=jd();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?(0,u.jsx)(u.Fragment,{children:t}):null};Ad.displayName="Tabs.Panel",Td.Group=Pd,Td.Tab=Cd,Td.Panel=Ad;const Md={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-sm font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-sm font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-xs font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},Nd="group-disabled:text-field-color-disabled",Dd={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},Id=e=>{var t;return"string"==typeof e?e:"object"==typeof e&&"textContent"in e?(null==(t=e.textContent)?void 0:t.toString().toLowerCase())||"":"object"==typeof e&&"children"in e?Id(e.children):""},Rd=(0,f.createContext)({}),Ld=()=>(0,f.useContext)(Rd);function zd({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:o,label:i,className:a,...s}){var l,c;const{sizeValue:d,getReferenceProps:p,getValues:h,selectId:m,refs:y,isOpen:g,multiple:v,combobox:b,setSelected:x,onChange:w,isControlled:_,disabled:S,by:O}=Ld(),k={sm:"xs",md:"sm",lg:"md"}[d],j=(0,f.useCallback)((()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return b?(0,u.jsx)(ze,{className:e}):(0,u.jsx)(Ie,{className:e})}),[t]),E=(0,f.useCallback)((()=>{const t=h();if(!t)return null;if(v)return t.map(((e,t)=>(0,u.jsx)(Ho,{className:"cursor-default",icon:r,type:"rounded",size:k,onMouseDown:P(e),label:"function"==typeof o?o(e):e.toString(),closable:!0,disabled:S},t)));let n="string"==typeof t?t:"";if("function"==typeof o&&(n=o(t)),"function"==typeof e&&"function"!=typeof o){const r={value:t,...v?{onClose:P(t)}:{}};n=e(r)}return((0,f.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof o&&(n=e),(0,u.jsx)("span",{className:ve("truncate",Md[d].displaySelected,Nd),children:n})}),[h,S]),P=e=>t=>{null==t||t.preventDefault(),null==t||t.stopPropagation();const n=[...h()??[]],r=n.findIndex((t=>null!==t&&null!==e&&"object"==typeof t?t[O]===e[O]:t===e));-1!==r&&(n.splice(r,1),_||x(n),"function"==typeof w&&w(n))};return(0,u.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!i&&(0,u.jsx)("label",{className:ve(null==(l=Md[d])?void 0:l.label,"text-field-label"),htmlFor:m,children:i}),(0,u.jsxs)("button",{id:m,ref:y.setReference,className:ve("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!g&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Md[d].selectButton,v&&Md[d].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",a),tabIndex:0,disabled:S,...s,...p(),children:[(0,u.jsxs)("div",{className:ve("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",h()&&"flex flex-wrap"),children:[E(),(v?!(null!=(c=h())&&c.length):!h())&&(0,u.jsx)("div",{className:ve("[grid-area:1/1/2/3] text-field-input px-1",Md[d].displaySelected,Nd),children:n})]}),(0,u.jsx)("div",{className:ve("flex items-center [&>svg]:shrink-0",Md[d].icon),children:j()})]})]})}function Bd({label:e,children:t,className:n,...r}){const{index:o,totalGroups:i}=r,{sizeValue:a}=Ld();return(0,u.jsxs)(f.Fragment,{children:[(0,u.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,u.jsx)("div",{className:ve("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[a],n),id:`group-${null==e?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,u.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${null==e?void 0:e.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),o<i&&!!(t&&f.Children.count(t)>0)&&(0,u.jsx)("hr",{className:ve("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",Dd[a])})]})}function Fd({children:e,className:t}){const{isOpen:n,context:r,refs:o,combobox:i,floatingStyles:a,getFloatingProps:s,sizeValue:l,setSearchKeyword:c,setActiveIndex:d,setSelectedIndex:p,value:h,selected:m,getValues:y,searchKeyword:g,listContentRef:v,by:b,searchPlaceholder:x,activeIndex:w}=Ld(),_=(0,f.useMemo)((()=>{const t=y();let n=-1;if(t){let r=f.Children.toArray(e);r.length>0&&(0,f.isValidElement)(r[0])&&r[0].type===Bd&&(r=f.Children.toArray(e).map((e=>(0,f.isValidElement)(e)?f.Children.toArray(e.props.children):[])).flat()),n=r.findIndex((e=>{if(!(0,f.isValidElement)(e))return!1;const n=e.props.value;return"object"==typeof n&&"object"==typeof t?n[b]===t[b]:n===t}))}return n}),[h,m,e,b]);(0,f.useLayoutEffect)((()=>{n||(d(_),p(_))}),[_,n]),(0,f.useLayoutEffect)((()=>{n&&(i&&[-1,null].includes(w)||d(-1))}),[g,n]);const S=(0,f.useMemo)((()=>{let t=0,n=0;f.Children.forEach(e,(e=>{(0,f.isValidElement)(e)&&e.type===Bd&&f.Children.toArray(e.props.children).some((e=>{var t;if(!(0,f.isValidElement)(e))return!1;if(g){const n=null==(t=Id(e.props.children))?void 0:t.toLowerCase(),r=g.toLowerCase();return n.includes(r)}return!0}))&&t++})),n=Math.max(0,t-1);let r=0,o=0;const i=e=>{var t,a;if(!(0,f.isValidElement)(e))return null;if(e.type===Bd){const t=f.Children.map(e.props.children,i);if(!(null==t?void 0:t.some((e=>null!==e))))return null;const r={...e.props,children:t,index:o,totalGroups:n};return o++,(0,f.cloneElement)(e,r)}if(g){const n=null==(a=Id(null==(t=e.props)?void 0:t.children))?void 0:a.toLowerCase(),r=g.toLowerCase();if(!(null==n?void 0:n.includes(r)))return null}return(0,f.cloneElement)(e,{...e.props,index:r++})};return f.Children.map(e,i)}),[g,h,m,e]),O=f.Children.count(S);return(0,f.useEffect)((()=>{v.current=[];let t=f.Children.toArray(e);t&&(0,f.isValidElement)(t[0])&&t[0].type===Bd&&(t=f.Children.toArray(t).map((e=>(0,f.isValidElement)(e)?e.props.children:null)).filter(Boolean)),f.Children.forEach(t,(e=>{var t,n;if(!(0,f.isValidElement)(e))return;const r=null==(n=Id(null==(t=e.props)?void 0:t.children))?void 0:n.toLowerCase();if(g){const e=g.toLowerCase();if(!(null==r?void 0:r.includes(e)))return}v.current.push(r)}))}),[g]),(0,u.jsx)(u.Fragment,{children:n&&(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(lo,{context:r,modal:!1,children:(0,u.jsxs)("div",{ref:o.setFloating,className:ve("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",i&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Md[l].dropdown,!i&&"h-auto",i?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...a},...s(),children:[i&&(0,u.jsxs)("div",{className:ve(Md[l].searchbarWrapper),children:[(0,u.jsx)(qe,{className:ve("text-icon-secondary shrink-0",Md[l].searchbarIcon)}),(0,u.jsx)("input",{className:ve("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Md[l].searchbar),type:"search",name:"keyword",placeholder:x,onChange:e=>c(e.target.value),value:g,autoComplete:"off"})]}),(0,u.jsxs)("div",{className:ve("overflow-y-auto overflow-x-hidden",!i&&"w-full h-full",Md[l].dropdownItemsWrapper),children:[!!O&&S,!O&&(0,u.jsx)("div",{className:"p-2 text-center text-base font-medium text-field-placeholder",children:"No items found"})]})]})})})})}function Wd({children:e,root:t,id:n}){return(0,u.jsx)(eo,{id:n,root:t,children:e})}function Vd({value:e,selected:t,children:n,className:r,...o}){const{sizeValue:i,getItemProps:a,onKeyDownItem:s,onClickItem:l,activeIndex:c,selectedIndex:d,updateListRef:p,getValues:h,by:m,multiple:y}=Ld(),{index:g}=o,v=(0,f.useRef)(g),b=(0,f.useMemo)((()=>{if(!y)return!1;const t=h();return!!t&&t.some((t=>null!==t&&null!==e&&"object"==typeof t?t[m]===e[m]:t===e))}),[e,h]),x=(0,f.useMemo)((()=>"boolean"==typeof t?t:y?b:g===d),[b,d,t]);return(0,u.jsxs)("div",{className:ve("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",{sm:"py-1.5 px-2 text-sm font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"}[i],g===c&&"bg-button-tertiary-hover",r),ref:e=>{p(g,e)},role:"option",tabIndex:g===c?0:-1,"aria-selected":x&&g===c,...a({onClick(){l(v.current,e)},onKeyDown(t){s(t,v.current,e)}}),children:[(0,u.jsx)("span",{className:"w-full truncate",children:n}),x&&(0,u.jsx)(De,{className:ve("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[i])})]})}const $d=({id:e,size:t="md",value:n,defaultValue:r,onChange:o,by:i="id",children:a,multiple:s=!1,combobox:l=!1,disabled:c=!1,searchPlaceholder:d="Search..."})=>{const p=(0,f.useMemo)((()=>e||`select-${ke()}`),[e]),h=(0,f.useMemo)((()=>typeof n<"u"),[n]),[m,y]=(0,f.useState)(r),[g,v]=(0,f.useState)(""),b=(0,f.useCallback)((()=>h?n:m),[h,n,m]),[x,w]=(0,f.useState)(!1),[_,S]=(0,f.useState)(null),[O,k]=(0,f.useState)(null),j={sm:l?256:172,md:l?256:216,lg:l?256:216},{refs:E,floatingStyles:P,context:C}=go({placement:"bottom-start",open:x,onOpenChange:w,whileElementsMounted:Fn,middleware:[Jn(5),er({padding:10}),tr({apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${j[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),T=(0,f.useRef)([]),A=(0,f.useRef)([]),M=(0,f.useRef)(!1),N=fo(C,{event:"mousedown"}),D=yo(C),I=Po(C,{role:"listbox"}),R=function(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:i,activeIndex:a,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:y="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:v=!0,disabledIndices:b,orientation:x="vertical",cols:w=1,scrollItemIntoView:_=!0,virtualItemRef:S,itemSizes:O,dense:k=!1}=t,j=Tr(ro(o.floating)),E=Er(),P=Pr(),C=ir(s),T=Bt(o.domReference),A=f.useRef(y),M=f.useRef(c??-1),N=f.useRef(null),D=f.useRef(!0),I=f.useRef(C),R=f.useRef(!!o.floating),L=f.useRef(n),z=f.useRef(!1),B=f.useRef(!1),F=Tr(b),W=Tr(n),V=Tr(_),$=Tr(c),[U,K]=f.useState(),[q,H]=f.useState(),Y=ir((function(e,t,n){function r(e){m?(K(e.id),null==P||P.events.emit("virtualfocus",e),S&&(S.current=e)):Dr(e,{preventScroll:!0,sync:!(!Mt()||!Tt())&&(_o||z.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame((()=>{const i=e.current[t.current]||o;if(!i)return;o||r(i);const a=V.current;a&&G&&(n||!D.current)&&(null==i.scrollIntoView||i.scrollIntoView("boolean"==typeof a?{block:"nearest",inline:"nearest"}:a))}))}));vr((()=>{document.createElement("div").focus({get preventScroll(){return _o=!0,!1}})}),[]),vr((()=>{l&&(n&&o.floating?A.current&&null!=c&&(B.current=!0,M.current=c,C(c)):R.current&&(M.current=-1,I.current(null)))}),[l,n,o.floating,c,C]),vr((()=>{if(l&&n&&o.floating)if(null==a){if(z.current=!1,null!=$.current)return;if(R.current&&(M.current=-1,Y(i,M)),(!L.current||!R.current)&&A.current&&(null!=N.current||!0===A.current&&null==N.current)){let e=0;const t=()=>{null==i.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(M.current=null==N.current||ko(N.current,x,h)||p?dr(i,F.current):pr(i,F.current),N.current=null,C(M.current))};t()}}else fr(i,a)||(M.current=a,Y(i,M,B.current),B.current=!1)}),[l,n,o.floating,a,$,p,i,x,h,C,Y,F]),vr((()=>{var e;if(!l||o.floating||!P||m||!R.current)return;const t=P.nodesRef.current,n=null==(e=t.find((e=>e.id===E)))||null==(e=e.context)?void 0:e.elements.floating,r=Ot(Dt(o.floating)),i=t.some((e=>e.context&&kt(e.context.elements.floating,r)));n&&!i&&D.current&&n.focus({preventScroll:!0})}),[l,o.floating,P,E,m]),vr((()=>{if(l&&P&&m&&!E)return P.events.on("virtualfocus",e),()=>{P.events.off("virtualfocus",e)};function e(e){H(e.id),S&&(S.current=e)}}),[l,P,m,E,S]),vr((()=>{I.current=C,R.current=!!o.floating})),vr((()=>{n||(N.current=null)}),[n]),vr((()=>{L.current=n}),[n]);const X=null!=a,G=f.useMemo((()=>{function e(e){if(!n)return;const t=i.current.indexOf(e);-1!==t&&C(t)}return{onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...g&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;!D.current||"touch"===t||(M.current=-1,Y(i,M),C(null),m||Dr(j.current,{preventScroll:!0}))}}}}),[n,j,Y,g,i,C,m]),Z=ir((e=>{if(D.current=!1,z.current=!0,229===e.which||!W.current&&e.currentTarget===j.current)return;if(p&&jo(e.key,x,h))return zt(e),r(!1,e.nativeEvent,"list-navigation"),void(ut(o.domReference)&&(m?null==P||P.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=M.current,a=dr(i,b),s=pr(i,b);if(T||("Home"===e.key&&(zt(e),M.current=a,C(M.current)),"End"===e.key&&(zt(e),M.current=s,C(M.current))),w>1){const t=O||Array.from({length:i.current.length},(()=>({width:1,height:1}))),n=function(e,t,n){const r=[];let o=0;return e.forEach(((e,i)=>{let{width:a,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<a;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+a<=t&&e.every((e=>null==r[e]))?(e.forEach((e=>{r[e]=i})),l=!0):o++}})),[...r]}(t,w,k),r=n.findIndex((e=>null!=e&&!gr(i.current,e,b))),o=n.reduce(((e,t,n)=>null==t||gr(i.current,t,b)?e:n),-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:i,cols:a,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:f=!1}=t,d=u;if(n.key===ar){if(f&&zt(n),-1===u)d=c;else if(d=hr(e,{startingIndex:d,amount:a,decrement:!0,disabledIndices:s}),o&&(u-a<l||d<0)){const e=u%a,t=c%a,n=c-(t-e);d=t===e?c:t>e?n:n-a}fr(e,d)&&(d=u)}if(n.key===sr&&(f&&zt(n),-1===u?d=l:(d=hr(e,{startingIndex:u,amount:a,disabledIndices:s}),o&&u+a>c&&(d=hr(e,{startingIndex:u%a-a,amount:a,disabledIndices:s}))),fr(e,d)&&(d=u)),"both"===r){const t=$t(u/a);n.key===(i?lr:cr)&&(f&&zt(n),u%a!=a-1?(d=hr(e,{startingIndex:u,disabledIndices:s}),o&&ur(d,a,t)&&(d=hr(e,{startingIndex:u-u%a-1,disabledIndices:s}))):o&&(d=hr(e,{startingIndex:u-u%a-1,disabledIndices:s})),ur(d,a,t)&&(d=u)),n.key===(i?cr:lr)&&(f&&zt(n),u%a!=0?(d=hr(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&ur(d,a,t)&&(d=hr(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s}))):o&&(d=hr(e,{startingIndex:u+(a-u%a),decrement:!0,disabledIndices:s})),ur(d,a,t)&&(d=u));const r=$t(c/a)===t;fr(e,d)&&(d=o&&r?n.key===(i?cr:lr)?c:hr(e,{startingIndex:u-u%a-1,disabledIndices:s}):u)}return d}({current:n.map((e=>null!=e?i.current[e]:null))},{event:e,orientation:x,loop:d,rtl:h,cols:w,disabledIndices:yr([...b||i.current.map(((e,t)=>gr(i.current,t)?t:void 0)),void 0],n),minIndex:r,maxIndex:o,prevIndex:mr(M.current>s?a:M.current,t,n,w,e.key===sr?"bl":e.key===(h?lr:cr)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(M.current=l,C(M.current)),"both"===x)return}if(Oo(e.key,x)){if(zt(e),n&&!m&&Ot(e.currentTarget.ownerDocument)===e.currentTarget)return M.current=ko(e.key,x,h)?a:s,void C(M.current);ko(e.key,x,h)?M.current=d?t>=s?u&&t!==i.current.length?-1:a:hr(i,{startingIndex:t,disabledIndices:b}):Math.min(s,hr(i,{startingIndex:t,disabledIndices:b})):M.current=d?t<=a?u&&-1!==t?i.current.length:s:hr(i,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(a,hr(i,{startingIndex:t,decrement:!0,disabledIndices:b})),fr(i,M.current)?C(null):C(M.current)}})),J=f.useMemo((()=>m&&n&&X&&{"aria-activedescendant":q||U}),[m,n,X,q,U]),Q=f.useMemo((()=>({"aria-orientation":"both"===x?void 0:x,...!Bt(o.domReference)&&J,onKeyDown:Z,onPointerMove(){D.current=!0}})),[J,Z,o.domReference,x]),ee=f.useMemo((()=>{function e(e){"auto"===y&&Pt(e.nativeEvent)&&(A.current=!0)}return{...J,onKeyDown(e){D.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),a=t||o,s=function(e,t,n){return So(t,n?e===lr:e===cr,e===sr)}(e.key,x,h),l=jo(e.key,x,h),u=Oo(e.key,x),f=(p?s:u)||"Enter"===e.key||""===e.key.trim();if(m&&n){const t=null==P?void 0:P.nodesRef.current.find((e=>null==e.parentId)),n=P&&t?function(e,t){let n,r=-1;return function t(o,i){i>r&&(n=o,r=i),Ir(e,o).forEach((e=>{t(e.id,i+1)}))}(t,0),e.find((e=>e.id===n))}(P.nodesRef.current,t.id):null;if(a&&n&&S){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var d,y;const r=(null==(d=n.context)?void 0:d.elements.domReference)===e.currentTarget,o=l&&!r?null==(y=n.context)?void 0:y.elements.domReference:s?i.current.find((e=>(null==e?void 0:e.id)===U)):null;o&&(zt(e),o.dispatchEvent(t),H(void 0))}var g;if((u||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return zt(e),void(null==(g=n.context.elements.domReference)||g.dispatchEvent(t))}return Z(e)}if(n||v||!t){if(f&&(N.current=p&&u?null:e.key),p)return void(s&&(zt(e),n?(M.current=dr(i,F.current),C(M.current)):r(!0,e.nativeEvent,"list-navigation")));u&&(null!=c&&(M.current=c),zt(e),!n&&v?r(!0,e.nativeEvent,"list-navigation"):Z(e),n&&C(M.current))}},onFocus(){n&&!m&&C(null)},onPointerDown:function(e){A.current=y,"auto"===y&&Ct(e.nativeEvent)&&(A.current=!0)},onMouseDown:e,onClick:e}}),[U,J,Z,F,y,i,p,C,r,n,v,x,h,c,P,m,S]);return f.useMemo((()=>l?{reference:ee,floating:Q,item:G}:{}),[l,ee,Q,G])}(C,{listRef:T,activeIndex:_,selectedIndex:O,onNavigate:S,loop:!0}),L=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:h=null}=t,m=f.useRef(),y=f.useRef(""),g=f.useRef(null!=(n=h??a)?n:-1),v=f.useRef(null),b=ir(s),x=ir(l),w=Tr(u),_=Tr(p);vr((()=>{r&&(clearTimeout(m.current),v.current=null,y.current="")}),[r]),vr((()=>{var e;r&&""===y.current&&(g.current=null!=(e=h??a)?e:-1)}),[r,h,a]);const S=ir((e=>{e?o.current.typing||(o.current.typing=e,x(e)):o.current.typing&&(o.current.typing=e,x(e))})),O=ir((e=>{function t(e,t,n){const r=w.current?w.current(t,n):t.find((e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()))));return r?e.indexOf(r):-1}const n=i.current;if(y.current.length>0&&" "!==y.current[0]&&(-1===t(n,n,y.current)?S(!1):" "===e.key&&zt(e)),null==n||_.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(zt(e),S(!0)),n.every((e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())}))&&y.current===e.key&&(y.current="",g.current=v.current),y.current+=e.key,clearTimeout(m.current),m.current=setTimeout((()=>{y.current="",g.current=v.current,S(!1)}),d);const o=g.current,a=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],y.current);-1!==a?(b(a),v.current=a):" "!==e.key&&(y.current="",S(!1))})),k=f.useMemo((()=>({onKeyDown:O})),[O]),j=f.useMemo((()=>({onKeyDown:O,onKeyUp(e){" "===e.key&&S(!1)}})),[O,S]);return f.useMemo((()=>c?{reference:k,floating:j}:{}),[c,k,j])}(C,{listRef:A,activeIndex:_,selectedIndex:O,onMatch:x?S:k,onTypingChange(e){M.current=e}}),{getReferenceProps:z,getFloatingProps:B,getItemProps:F}=wo([D,I,R,N,...l?[]:[L]]),W=(e,t)=>{if(s)return((e,t)=>{const n=[...b()??[]];-1===n.findIndex((e=>null!==e&&null!==t&&"object"==typeof e?e[i]===t[i]:e===t))&&(n.push(t),h||y(n),k(e),E.reference.current.focus(),w(!1),v(""),"function"==typeof o&&o(n))})(e,t);k(e),h||y(t),E.reference.current.focus(),w(!1),v(""),"function"==typeof o&&o(t)},V=(0,f.useCallback)(((e,t)=>{T.current[e]=t}),[]);return(0,u.jsx)(Rd.Provider,{value:{selectedIndex:O,setSelectedIndex:k,activeIndex:_,setActiveIndex:S,selected:m,setSelected:y,handleSelect:W,combobox:l,sizeValue:t,multiple:s,onChange:o,isTypingRef:M,getItemProps:F,onClickItem:(e,t)=>{W(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),W(t,n))," "===e.key&&!M.current&&(e.preventDefault(),W(t,n))},getValues:b,selectId:p,getReferenceProps:z,isOpen:x,value:n,updateListRef:V,refs:E,listContentRef:A,by:i,getFloatingProps:B,floatingStyles:P,context:C,searchKeyword:g,setSearchKeyword:v,disabled:c,isControlled:h,searchPlaceholder:d},children:a})};Wd.displayName="Select.Portal",zd.displayName="Select.Button",Fd.displayName="Select.Options",Vd.displayName="Select.Option",Bd.displayName="Select.OptionGroup",$d.Portal=Wd,$d.Button=zd,$d.Options=Fd,$d.Option=Vd,$d.OptionGroup=Bd;let Ud=1;var Kd,qd;Kd=new WeakMap,qd=new WeakMap;const Hd=new class{constructor(){w(this,Kd),w(this,qd),_(this,Kd,[]),_(this,qd,[])}subscribe(e){return x(this,qd).push(e),()=>{_(this,qd,x(this,qd).filter((t=>t!==e)))}}publish(e){x(this,qd).forEach((t=>t(e)))}add(e){x(this,Kd).push(e),this.publish(e)}remove(e){return _(this,Kd,x(this,Kd).filter((t=>t.id!==e))),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:Ud++;return x(this,Kd).find((e=>e.id===i))&&_(this,Kd,x(this,Kd).map((e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e))),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}_(this,Kd,x(this,Kd).map((t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t)))}dismiss(e){return e||x(this,Kd).forEach((e=>x(this,qd).forEach((t=>t({id:e.id,dismiss:!0}))))),x(this,qd).forEach((t=>t({id:e,dismiss:!0}))),e}history(){return x(this,Kd)}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}};Object.seal(Object.assign(((e,t)=>Hd.default(e,t)),{success:Hd.success.bind(Hd),error:Hd.error.bind(Hd),warning:Hd.warning.bind(Hd),info:Hd.info.bind(Hd),custom:Hd.custom.bind(Hd),dismiss:Hd.dismiss.bind(Hd),update:Hd.update.bind(Hd)},{getHistory:Hd.history.bind(Hd)}));let Yd=!1;const Xd={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},Gd={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Zd="bg-background-inverse border-background-inverse",Jd={light:"text-icon-secondary",dark:"text-icon-inverse"},Qd=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:o=5e3,theme:i="light",design:a="stack",icon:s,variant:l="neutral",removeToast:c})=>{var d,p,h,m,y,g,v;const b=(0,f.useRef)(0),x=(0,f.useRef)(0),w=(0,f.useRef)(),_=(e,t=o)=>{if(r&&!(o<0))return b.current=(new Date).getTime(),setTimeout((()=>{"function"==typeof c&&c(e.id)}),t)};(0,f.useEffect)((()=>{const t=o;return w.current=_(e,t),()=>{clearTimeout(w.current)}}),[]),(0,f.useEffect)((()=>{null==e||!e.dismiss||"function"!=typeof c||c(e.id)}),[e]);const S=()=>{var t,n;"function"==typeof c&&(null==(n=null==(t=null==e?void 0:e.action)?void 0:t.onClick)||n.call(t,(()=>c(e.id))))};let O=null;return"stack"===a&&(O=(0,u.jsx)("div",{className:ve("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===i?Zd:null==(d=Gd)?void 0:d[l],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(w.current),x.current=(new Date).getTime()},onMouseLeave:()=>{w.current=_(e,o-(x.current-b.current))},children:"custom"!==e.type?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Ro({variant:l,icon:s,theme:i})}),(0,u.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[zo({title:t,theme:i}),Bo({content:n,theme:i}),(null==(p=null==e?void 0:e.action)?void 0:p.label)&&"function"==typeof(null==(h=null==e?void 0:e.action)?void 0:h.onClick)&&(0,u.jsx)("div",{className:"mt-2.5",children:Lo({actionLabel:null==(m=null==e?void 0:e.action)?void 0:m.label,actionType:(null==(y=null==e?void 0:e.action)?void 0:y.type)??"button",onAction:S,theme:i})})]}),(0,u.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,u.jsx)("button",{className:ve("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Jd[i]??Jd.light),onClick:()=>{"function"==typeof c&&c(e.id)},children:(0,u.jsx)(Ze,{})})})]}):null==(g=null==e?void 0:e.jsx)?void 0:g.call(e,{close:()=>c(e.id),action:null!=e&&e.action?{...null==e?void 0:e.action,onClick:S}:null})})),"inline"===a&&(O=(0,u.jsxs)("div",{className:ve("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===i?Zd:null==(v=Gd)?void 0:v[l],"lg:w-[47.5rem] w-full"),children:[(0,u.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Ro({variant:l,icon:s,theme:i})}),(0,u.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[zo({title:t,theme:i}),Bo({content:n,theme:i})]}),(0,u.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,u.jsx)("button",{className:ve("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Jd[i]??Jd.light),onClick:()=>c(e.id),children:(0,u.jsx)(Ze,{})})})]})),O},ep=((e=>{(0,f.memo)((t=>{const n=t.singleTon;return Yd&&n?null:(Yd=!0,(0,u.jsx)(e,{...t}))}))})((({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:o=!0,dismissAfter:i=5e3})=>{const[a,s]=(0,f.useState)([]);(0,f.useEffect)((()=>{Hd.subscribe((e=>{null!=e&&e.dismiss?s((t=>t.map((t=>t.id===e.id?{...t,dismiss:!0}:t)))):setTimeout((()=>{(0,p.flushSync)((()=>s((t=>-1!==t.findIndex((t=>t.id===e.id))?t.map((t=>t.id===e.id?{...t,...e}:t)):[...t,e]))))}))}))}),[]);const l=e=>{s((t=>t.filter((t=>t.id!==e))))};return(0,u.jsx)("ul",{className:ve("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",Xd[e]??Xd["top-right"],r),children:(0,u.jsx)(bd,{initial:!1,children:a.map((e=>(0,u.jsx)(dd.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,u.jsx)(Qd,{toastItem:e,title:e.title,content:null==e?void 0:e.description,icon:(null==e?void 0:e.icon)??void 0,design:(null==e?void 0:e.design)??t,autoDismiss:(null==e?void 0:e.autoDismiss)??o,dismissAfter:(null==e?void 0:e.dismissAfter)??i,removeToast:l,variant:e.type,theme:(null==e?void 0:e.theme)??n})},e.id)))})})})),{sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}}),tp={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},np={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},rp={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},op={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},ip={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},ap={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},sp={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},lp={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},cp={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},up={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},fp={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},dp={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},pp={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},hp={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},mp={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},yp={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},gp=(e,t,n,r="sm")=>{var o,i,a,s,l;const c=[];switch(typeof e){case"object":for(const[r,a]of Object.entries(e))t[r]&&c.push((null==(o=null==t?void 0:t[r])?void 0:o[a])??(null==(i=null==t?void 0:t[r])?void 0:i[null==n?void 0:n[r]])??"");break;case"string":case"number":const u=r;c.push((null==(a=null==t?void 0:t[u])?void 0:a[e])??(null==(s=null==t?void 0:t[u])?void 0:s[null==n?void 0:n[u]])??"");break;default:if(void 0===e)break;c.push((null==(l=null==t?void 0:t[r])?void 0:l[n])??"")}return c.join(" ")},vp=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:i,justify:a,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:f=!1,autoCols:d=!1,children:p,...h})=>{const m=gp(t,ep,1),y=gp(n,tp,"sm"),g=gp(r,np,""),v=gp(o,rp,""),b=gp(i,lp,""),x=gp(a,sp,""),w=gp(s,ap,"");return(0,u.jsx)("div",{className:ve("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":d,"auto-rows-auto":f},m,y,g,v,b,x,w,e),...h,children:p})};vp.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:i,...a})=>{const s=gp(n,op,0),l=gp(r,ip,0),c=gp(o,cp,""),f=gp(i,up,"");return(0,u.jsx)("div",{className:ve(s,l,c,f,e),...a,children:t})};const bp=(0,f.createContext)({}),xp=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:i,align:a,wrap:s,cols:l,className:c,children:f,...d})=>{if("grid"===e)return(0,u.jsx)(bp.Provider,{value:{containerType:e},children:(0,u.jsx)(vp,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:i,...d})});const p=gp(s,dp,""),h=gp(t,tp,"sm"),m=gp(n,np,""),y=gp(r,rp,""),g=gp(o,fp,""),v=gp(i,sp,""),b=gp(a,lp,""),x=ve("flex",p,h,m,y,g,v,b,c);return(0,u.jsx)(bp.Provider,{value:{containerType:e,cols:l},children:"flex"===e?(0,u.jsx)("div",{className:x,children:f}):(0,u.jsx)(vp,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:f,align:a,justify:i,...d})})},wp=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:o,className:i,children:a,...s})=>{const{containerType:l,cols:c}=(0,f.useContext)(bp);if("grid"===l)return(0,u.jsx)(vp.Item,{className:i,alignSelf:r,justifySelf:o,children:a,...s});const d=gp(r,cp,""),p=gp(o,up,""),h=gp(e,mp,0),m=gp(t,yp,0),y=gp(n,hp,0),g=gp(c,pp,1);return(0,u.jsx)("div",{className:ve("box-border",h,m,y,d,p,g,i),children:a})};xp.Item=wp,xp.displayName="Container",wp.displayName="Container.Item";var _p=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const Sp=(0,f.createContext)(null);function Op(){const e=(0,f.useContext)(Sp);return null==e&&_p(8),e}function kp({defaultSelection:e}){const[t]=Op();return(0,f.useEffect)((()=>{t.focus((()=>{const e=document.activeElement,n=t.getRootElement();null===n||null!==e&&n.contains(e)||n.focus({preventScroll:!0})}),{defaultSelection:e})}),[e,t]),null}const jp={},Ep={},Pp={},Cp={},Tp={},Ap={},Mp={},Np={},Dp={},Ip={},Rp={},Lp={},zp={},Bp={},Fp={},Wp={},Vp={},$p={},Up={},Kp={},qp={},Hp={},Yp={},Xp={},Gp={},Zp={},Jp={},Qp={},eh={},th={},nh={},rh={},oh={},ih={},ah={},sh={},lh={},ch={},uh={},fh={},dh=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,ph=dh&&"documentMode"in document?document.documentMode:null,hh=dh&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),mh=dh&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),yh=!(!dh||!("InputEvent"in window)||ph)&&"getTargetRanges"in new window.InputEvent("input"),gh=dh&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),vh=dh&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,bh=dh&&/Android/.test(navigator.userAgent),xh=dh&&/^(?=.*Chrome).*/i.test(navigator.userAgent),wh=dh&&bh&&xh,_h=dh&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!xh,Sh=0,Oh=1,kh=2,jh=1,Eh=2,Ph=3,Ch=4,Th=5,Ah=6,Mh=gh||vh||_h?" ":"",Nh="\n\n",Dh=mh?" ":Mh,Ih="֑-߿יִ-﷽ﹰ-ﻼ",Rh="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",Lh=new RegExp("^[^"+Rh+"]*["+Ih+"]"),zh=new RegExp("^[^"+Ih+"]*["+Rh+"]"),Bh={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},Fh={directionless:1,unmergeable:2},Wh={center:2,end:6,justify:4,left:1,right:3,start:5},Vh={[Eh]:"center",[Ah]:"end",[Ch]:"justify",[jh]:"left",[Ph]:"right",[Th]:"start"},$h={normal:0,segmented:2,token:1},Uh={[Sh]:"normal",[kh]:"segmented",[Oh]:"token"};var Kh=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function qh(...e){const t=[];for(const n of e)if(n&&"string"==typeof n)for(const[e]of n.matchAll(/\S+/g))t.push(e);return t}let Hh=!1,Yh=0;function Xh(e){Yh=e.timeStamp}function Gh(e,t,n){return t.__lexicalLineBreak===e||void 0!==e[`__lexicalKey_${n._key}`]}function Zh(e,t,n){const r=ay(n._window);let o=null,i=null;null!==r&&r.anchorNode===e&&(o=r.anchorOffset,i=r.focusOffset);const a=e.nodeValue;null!==a&&Rm(t,a,o,i,!1)}function Jh(e,t,n){if(Zg(e)){const t=e.anchor.getNode();if(t.is(n)&&e.format!==t.getFormat())return!1}return 3===t.nodeType&&n.isAttached()}function Qh(e,t,n){Hh=!0;const r=performance.now()-Yh>100;try{Bv(e,(()=>{const o=uv()||e.getEditorState().read((()=>{const e=uv();return null!==e?e.clone():null})),i=new Map,a=e.getRootElement(),s=e._editorState,l=e._blockCursorElement;let c=!1,u="";for(let n=0;n<t.length;n++){const f=t[n],d=f.type,p=f.target;let h=Sm(p,s);if(!(null===h&&p!==a||Uv(h)))if("characterData"===d)r&&Wg(h)&&Jh(o,p,h)&&Zh(p,h,e);else if("childList"===d){c=!0;const t=f.addedNodes;for(let n=0;n<t.length;n++){const r=t[n],o=_m(r),i=r.parentNode;if(null!=i&&r!==l&&null===o&&("BR"!==r.nodeName||!Gh(r,i,e))){if(mh){const e=r.innerText||r.nodeValue;e&&(u+=e)}i.removeChild(r)}}const n=f.removedNodes,r=n.length;if(r>0){let t=0;for(let o=0;o<r;o++){const r=n[o];("BR"===r.nodeName&&Gh(r,p,e)||l===r)&&(p.appendChild(r),t++)}r!==t&&(p===a&&(h=Em(s)),i.set(p,h))}}}if(i.size>0)for(const[t,n]of i)if(Wv(n)){const r=n.getChildrenKeys();let o=t.firstChild;for(let n=0;n<r.length;n++){const i=r[n],a=e.getElementByKey(i);null!==a&&(null==o?(t.appendChild(a),o=a):o!==a&&t.replaceChild(a,o),o=o.nextSibling)}}else Wg(n)&&n.markDirty();const f=n.takeRecords();if(f.length>0){for(let t=0;t<f.length;t++){const n=f[t],r=n.addedNodes,o=n.target;for(let t=0;t<r.length;t++){const n=r[t],i=n.parentNode;null==i||"BR"!==n.nodeName||Gh(n,o,e)||i.removeChild(n)}}n.takeRecords()}null!==o&&(c&&(o.dirty=!0,Pm(o)),mh&&Ym(e)&&o.insertRawText(u))}))}finally{Hh=!1}}function em(e){const t=e._observer;null!==t&&Qh(e,t.takeRecords(),t)}function tm(e){0===Yh&&ey(e).addEventListener("textInput",Xh,!0),e._observer=new MutationObserver(((t,n)=>{Qh(e,t,n)}))}function nm(e,t){const n=e.__mode,r=e.__format,o=e.__style,i=t.__mode,a=t.__format,s=t.__style;return!(null!==n&&n!==i||null!==r&&r!==a||null!==o&&o!==s)}function rm(e,t){const n=e.mergeWithSibling(t),r=Pv()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function om(e){let t,n,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&Wg(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){if(nm(t,r)){r=rm(t,r);break}break}t.remove()}for(;null!==(n=r.getNextSibling())&&Wg(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(""!==n.__text){if(nm(r,n)){r=rm(r,n);break}break}n.remove()}}else r.remove()}function im(e){for(;"element"===e.type;){const t=e.getNode(),n=e.offset;let r,o;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),o=!0):(r=t.getChildAtIndex(n),o=!1),Wg(r)){e.set(r.__key,o?r.getTextContentSize():0,"text");break}if(!Wv(r))break;e.set(r.__key,o?r.getChildrenSize():0,"element")}}let am=1;const sm="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function lm(e){const t=document.activeElement;if(null===t)return!1;const n=t.nodeName;return Uv(Sm(e))&&("INPUT"===n||"TEXTAREA"===n||"true"===t.contentEditable&&null==dm(t))}function cm(e,t,n){const r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(n)&&null!==t&&!lm(t)&&fm(t)===e}catch{return!1}}function um(e){return e instanceof nb}function fm(e){let t=e;for(;null!=t;){const e=dm(t);if(um(e))return e;t=Jm(t)}return null}function dm(e){return e?e.__lexicalEditor:null}function pm(e){return e.isToken()||e.isSegmented()}function hm(e){return 3===e.nodeType}function mm(e){let t=e;for(;null!=t;){if(hm(t))return t;t=t.firstChild}return null}function ym(e,t,n){const r=Bh[t];if(null!==n&&(e&r)==(n&r))return e;let o=e^r;return"subscript"===t?o&=~Bh.superscript:"superscript"===t&&(o&=~Bh.subscript),o}function gm(e){const t=e.getParent();if(null!==t){const n=e.getWritable(),r=t.getWritable(),o=e.getPreviousSibling(),i=e.getNextSibling();if(null===o)if(null!==i){const e=i.getWritable();r.__first=i.__key,e.__prev=null}else r.__first=null;else{const e=o.getWritable();if(null!==i){const t=i.getWritable();t.__prev=e.__key,e.__next=t.__key}else e.__next=null;n.__prev=null}if(null===i)if(null!==o){const e=o.getWritable();r.__last=o.__key,e.__next=null}else r.__last=null;else{const e=i.getWritable();if(null!==o){const t=o.getWritable();t.__next=e.__key,e.__prev=t.__key}else e.__prev=null;n.__next=null}r.__size--,n.__parent=null}}function vm(e){jv();const t=e.getLatest(),n=t.__parent,r=Ev(),o=Pv(),i=r._nodeMap,a=o._dirtyElements;null!==n&&function(e,t,n){let r=e;for(;null!==r;){if(n.has(r))return;const e=t.get(r);if(void 0===e)break;n.set(r,!1),r=e.__parent}}(n,i,a);const s=t.__key;o._dirtyType=1,Wv(e)?a.set(s,!0):o._dirtyLeaves.add(s)}function bm(e){kv();const t=Pv(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,null!==n){const e=wm(n);null!==e&&e.getWritable()}if(null!==e){const t=wm(e);null!==t&&t.getWritable()}}}function xm(){return Ov()?null:Pv()._compositionKey}function wm(e,t){const n=(t||Ev())._nodeMap.get(e);return void 0===n?null:n}function _m(e,t){const n=e[`__lexicalKey_${Pv()._key}`];return void 0!==n?wm(n,t):null}function Sm(e,t){let n=e;for(;null!=n;){const e=_m(n,t);if(null!==e)return e;n=Jm(n)}return null}function Om(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function km(e){return e.read((()=>jm().getTextContent()))}function jm(){return Em(Ev())}function Em(e){return e._nodeMap.get("root")}function Pm(e){kv();const t=Ev();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Cm(e){const t=Pv(),n=function(e,t){let n=e;for(;null!=n;){const e=n[`__lexicalKey_${t._key}`];if(void 0!==e)return e;n=Jm(n)}return null}(e,t);return null===n?e===t.getRootElement()?wm("root"):null:wm(n)}function Tm(e,t){return t?e.getTextContentSize():0}function Am(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Mm(e){const t=[];let n=e;for(;null!==n;)t.push(n),n=n._parentEditor;return t}function Nm(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Dm(e){return 3===e.nodeType?e.nodeValue:null}function Im(e,t,n){const r=ay(t._window);if(null===r)return;const o=r.anchorNode;let{anchorOffset:i,focusOffset:a}=r;if(null!==o){let t=Dm(o);const r=Sm(o);if(null!==t&&Wg(r)){if(t===Mh&&n){const e=n.length;t=n,i=e,a=e}null!==t&&Rm(r,t,i,a,e)}}}function Rm(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){const a=i.isComposing();let s=t;(a||o)&&t[t.length-1]===Mh&&(s=t.slice(0,-1));const l=i.getTextContent();if(o||s!==l){if(""===s){if(bm(null),gh||vh||_h)i.remove();else{const e=Pv();setTimeout((()=>{e.update((()=>{i.isAttached()&&i.remove()}))}),20)}return}const t=i.getParent(),o=fv(),l=i.getTextContentSize(),c=xm(),u=i.getKey();if(i.isToken()||null!==c&&u===c&&!a||Zg(o)&&(null!==t&&!t.canInsertTextBefore()&&0===o.anchor.offset||o.anchor.key===e.__key&&0===o.anchor.offset&&!i.canInsertTextBefore()&&!a||o.focus.key===e.__key&&o.focus.offset===l&&!i.canInsertTextAfter()&&!a))return void i.markDirty();const f=uv();if(!Zg(f)||null===n||null===r)return void i.setTextContent(s);if(f.setTextNodeRange(i,n,i,r),i.isSegmented()){const e=Fg(i.getTextContent());i.replace(e),i=e}i.setTextContent(s)}}}function Lm(e){return"ArrowLeft"===e}function zm(e){return"ArrowRight"===e}function Bm(e,t){return hh?e:t}function Fm(e){return"Enter"===e}function Wm(e){return"Backspace"===e}function Vm(e){return"Delete"===e}function $m(e,t,n){return"a"===e.toLowerCase()&&Bm(t,n)}function Um(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(void 0!==r)return r;const o=e[t];if("string"==typeof o){const e=qh(o);return n[t]=e,e}return o}function Km(e,t,n,r,o){if(0===n.size)return;const i=r.__type,a=r.__key,s=t.get(i);void 0===s&&Kh(33,i);const l=s.klass;let c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));const u=c.get(a),f="destroyed"===u&&"created"===o;(void 0===u||f)&&c.set(a,f?"updated":o)}function qm(e,t,n){const r=e.getParent();let o=n,i=e;return null!==r&&(t&&0===n?(o=i.getIndexWithinParent(),i=r):t||n!==i.getChildrenSize()||(o=i.getIndexWithinParent()+1,i=r)),i.getChildAtIndex(t?o-1:o)}function Hm(e,t){const n=e.offset;if("element"===e.type)return qm(e.getNode(),t,n);{const r=e.getNode();if(t&&0===n||!t&&n===r.getTextContentSize()){const e=t?r.getPreviousSibling():r.getNextSibling();return null===e?qm(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):e}}return null}function Ym(e){const t=ey(e).event,n=t&&t.inputType;return"insertFromPaste"===n||"insertFromPasteAsQuotation"===n}function Xm(e,t,n){return Rv(e,t,n)}function Gm(e){return!qv(e)&&!e.isLastChild()&&!e.isInline()}function Zm(e,t){const n=e._keyToDOMMap.get(t);return void 0===n&&Kh(75,t),n}function Jm(e){const t=e.assignedSlot||e.parentElement;return null!==t&&11===t.nodeType?t.host:t}function Qm(e,t){let n=e.getParent();for(;null!==n;){if(n.is(t))return!0;n=n.getParent()}return!1}function ey(e){const t=e._window;return null===t&&Kh(78),t}function ty(e){return qv(e)||Wv(e)&&e.isShadowRoot()}function ny(e){const t=Pv(),n=e.constructor.getType(),r=t._nodes.get(n);void 0===r&&Kh(97);const o=r.replace;if(null!==o){const t=o(e);return t instanceof e.constructor||Kh(98),t}return e}function ry(e,t){!qv(e.getParent())||Wv(t)||Uv(t)||Kh(99)}function oy(e){return(Uv(e)||Wv(e)&&!e.canBeEmpty())&&!e.isInline()}function iy(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;null!==r&&r.removeChild(e)}function ay(e){return dh?(e||window).getSelection():null}function sy(e){return 1===e.nodeType}function ly(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function cy(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function uy(e){if(qv(e)||Uv(e)&&!e.isInline())return!0;if(!Wv(e)||ty(e))return!1;const t=e.getFirstChild(),n=null===t||Sg(t)||Wg(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&n}function fy(e,t){let n=e;for(;null!==n&&null!==n.getParent()&&!t(n);)n=n.getParentOrThrow();return t(n)?n:null}const dy=new WeakMap,py=new Map;function hy(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function my(e,t,n,r,o,i){let a=e.getFirstChild();for(;null!==a;){const e=a.__key;a.__parent===t&&(Wv(a)&&my(a,e,n,r,o,i),n.has(e)||i.delete(e),o.push(e)),a=a.getNextSibling()}}let yy,gy,vy,by,xy,wy,_y,Sy,Oy,ky,jy="",Ey="",Py=null,Cy="",Ty="",Ay=!1,My=!1,Ny=null;function Dy(e,t){const n=_y.get(e);if(null!==t){const n=Xy(e);n.parentNode===t&&t.removeChild(n)}if(Sy.has(e)||gy._keyToDOMMap.delete(e),Wv(n)){const e=Ky(n,_y);Iy(e,0,e.length-1,null)}void 0!==n&&Km(ky,vy,by,n,"destroyed")}function Iy(e,t,n,r){let o=t;for(;o<=n;++o){const t=e[o];void 0!==t&&Dy(t,r)}}function Ry(e,t){e.setProperty("text-align",t)}const Ly="40px";function zy(e,t){const n=yy.theme.indent;if("string"==typeof n){const r=e.classList.contains(n);t>0&&!r?e.classList.add(n):t<1&&r&&e.classList.remove(n)}const r=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||Ly;e.style.setProperty("padding-inline-start",0===t?"":`calc(${t} * ${r})`)}function By(e,t){const n=e.style;0===t?Ry(n,""):1===t?Ry(n,"left"):2===t?Ry(n,"center"):3===t?Ry(n,"right"):4===t?Ry(n,"justify"):5===t?Ry(n,"start"):6===t&&Ry(n,"end")}function Fy(e,t,n){const r=Sy.get(e);void 0===r&&Kh(60);const o=r.createDOM(yy,gy);if(function(e,t,n){const r=n._keyToDOMMap;t["__lexicalKey_"+n._key]=e,r.set(e,t)}(e,o,gy),Wg(r)?o.setAttribute("data-lexical-text","true"):Uv(r)&&o.setAttribute("data-lexical-decorator","true"),Wv(r)){const e=r.__indent,t=r.__size;if(0!==e&&zy(o,e),0!==t){const e=t-1;!function(e,t,n,r){const o=Ey;Ey="",Wy(e,n,0,t,r,null),Uy(n,r),Ey=o}(Ky(r,Sy),e,r,o)}const n=r.__format;0!==n&&By(o,n),r.isInline()||$y(null,r,o),Gm(r)&&(jy+=Nh,Ty+=Nh)}else{const t=r.getTextContent();if(Uv(r)){const t=r.decorate(gy,yy);null!==t&&Hy(e,t),o.contentEditable="false"}else Wg(r)&&(r.isDirectionless()||(Ey+=t));jy+=t,Ty+=t}if(null!==t)if(null!=n)t.insertBefore(o,n);else{const e=t.__lexicalLineBreak;null!=e?t.insertBefore(o,e):t.appendChild(o)}return Km(ky,vy,by,r,"created"),o}function Wy(e,t,n,r,o,i){const a=jy;jy="";let s=n;for(;s<=r;++s){Fy(e[s],o,i);const t=Sy.get(e[s]);null!==t&&Wg(t)&&(null===Py&&(Py=t.getFormat()),""===Cy&&(Cy=t.getStyle()))}Gm(t)&&(jy+=Nh),o.__lexicalTextContent=jy,jy=a+jy}function Vy(e,t){const n=t.get(e);return Sg(n)||Uv(n)&&n.isInline()}function $y(e,t,n){const r=null!==e&&(0===e.__size||Vy(e.__last,_y)),o=0===t.__size||Vy(t.__last,Sy);if(r){if(!o){const e=n.__lexicalLineBreak;if(null!=e)try{n.removeChild(e)}catch(t){if("object"==typeof t&&null!=t){const r=`${t.toString()} Parent: ${n.tagName}, child: ${e.tagName}.`;throw new Error(r)}throw t}n.__lexicalLineBreak=null}}else if(o){const e=document.createElement("br");n.__lexicalLineBreak=e,n.appendChild(e)}}function Uy(e,t){const n=t.__lexicalDirTextContent,r=t.__lexicalDir;if(n!==Ey||r!==Ny){const n=""===Ey,i=n?Ny:(o=Ey,Lh.test(o)?"rtl":zh.test(o)?"ltr":null);if(i!==r){const o=t.classList,a=yy.theme;let s=null!==r?a[r]:void 0,l=null!==i?a[i]:void 0;if(void 0!==s){if("string"==typeof s){const e=qh(s);s=a[r]=e}o.remove(...s)}if(null===i||n&&"ltr"===i)t.removeAttribute("dir");else{if(void 0!==l){if("string"==typeof l){const e=qh(l);l=a[i]=e}void 0!==l&&o.add(...l)}t.dir=i}My||(e.getWritable().__dir=i)}Ny=i,t.__lexicalDirTextContent=Ey,t.__lexicalDir=i}var o}function Ky(e,t){const n=[];let r=e.__first;for(;null!==r;){const e=t.get(r);void 0===e&&Kh(101),n.push(r),r=e.__next}return n}function qy(e,t){const n=_y.get(e);let r=Sy.get(e);void 0!==n&&void 0!==r||Kh(61);const o=Ay||wy.has(e)||xy.has(e),i=Zm(gy,e);if(n===r&&!o){if(Wv(n)){const e=i.__lexicalTextContent;void 0!==e&&(jy+=e,Ty+=e);const t=i.__lexicalDirTextContent;void 0!==t&&(Ey+=t)}else{const e=n.getTextContent();Wg(n)&&!n.isDirectionless()&&(Ey+=e),Ty+=e,jy+=e}return i}if(n!==r&&o&&Km(ky,vy,by,r,"updated"),r.updateDOM(n,i,yy)){const n=Fy(e,null,null);return null===t&&Kh(62),t.replaceChild(n,i),Dy(e,null),n}if(Wv(n)&&Wv(r)){const e=r.__indent;e!==n.__indent&&zy(i,e);const t=r.__format;t!==n.__format&&By(i,t),o&&(function(e,t,n){const r=Ey;var o,i;Ey="",Py=null,Cy="",function(e,t,n){const r=jy,o=e.__size,i=t.__size;if(jy="",1===o&&1===i){const r=e.__first,o=t.__first;if(r===o)qy(r,n);else{const e=Xy(r),t=Fy(o,null,null);try{n.replaceChild(t,e)}catch(i){if("object"==typeof i&&null!=i){const a=`${i.toString()} Parent: ${n.tagName}, new child: {tag: ${t.tagName} key: ${o}}, old child: {tag: ${e.tagName}, key: ${r}}.`;throw new Error(a)}throw i}Dy(r,null)}const i=Sy.get(o);Wg(i)&&(null===Py&&(Py=i.getFormat()),""===Cy&&(Cy=i.getStyle()))}else{const r=Ky(e,_y),a=Ky(t,Sy);if(0===o)0!==i&&Wy(a,t,0,i-1,n,null);else if(0===i){if(0!==o){const e=null==n.__lexicalLineBreak;Iy(r,0,o-1,e?null:n),e&&(n.textContent="")}}else!function(e,t,n,r,o,i){const a=r-1,s=o-1;let l,c,u=i.firstChild,f=0,d=0;for(;f<=a&&d<=s;){const e=t[f],r=n[d];if(e===r)u=Yy(qy(r,i)),f++,d++;else{void 0===l&&(l=new Set(t)),void 0===c&&(c=new Set(n));const o=c.has(e),a=l.has(r);if(o)if(a){const e=Zm(gy,r);e===u?u=Yy(qy(r,i)):(null!=u?i.insertBefore(e,u):i.appendChild(e),qy(r,i)),f++,d++}else Fy(r,i,u),d++;else u=Yy(Xy(e)),Dy(e,i),f++}const o=Sy.get(r);null!==o&&Wg(o)&&(null===Py&&(Py=o.getFormat()),""===Cy&&(Cy=o.getStyle()))}const p=f>a,h=d>s;if(p&&!h){const t=n[s+1];Wy(n,e,d,s,i,void 0===t?null:gy.getElementByKey(t))}else h&&!p&&Iy(t,f,a,i)}(t,r,a,o,i,n)}Gm(t)&&(jy+=Nh),n.__lexicalTextContent=jy,jy=r+jy}(e,t,n),Uy(t,n),eb(o=t)&&null!=Py&&Py!==o.__textFormat&&!My&&(o.setTextFormat(Py),o.setTextStyle(Cy)),eb(i=t)&&""!==Cy&&Cy!==i.__textStyle&&!My&&i.setTextStyle(Cy),Ey=r}(n,r,i),qv(r)||r.isInline()||$y(n,r,i)),Gm(r)&&(jy+=Nh,Ty+=Nh)}else{const t=r.getTextContent();if(Uv(r)){const t=r.decorate(gy,yy);null!==t&&Hy(e,t)}else Wg(r)&&!r.isDirectionless()&&(Ey+=t);jy+=t,Ty+=t}if(!My&&qv(r)&&r.__cachedText!==Ty){const e=r.getWritable();e.__cachedText=Ty,r=e}return i}function Hy(e,t){let n=gy._pendingDecorators;const r=gy._decorators;if(null===n){if(r[e]===t)return;n=Om(gy)}n[e]=t}function Yy(e){let t=e.nextSibling;return null!==t&&t===gy._blockCursorElement&&(t=t.nextSibling),t}function Xy(e){const t=Oy.get(e);return void 0===t&&Kh(75,e),t}const Gy=Object.freeze({}),Zy=[["keydown",function(e,t){if(Jy=e.timeStamp,Qy=e.key,t.isComposing())return;const{key:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:a}=e;Xm(t,Bp,e)||null!=n&&(function(e,t,n,r){return zm(e)&&!t&&!r&&!n}(n,o,a,i)?Xm(t,Fp,e):function(e,t,n,r,o){return zm(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Xm(t,Wp,e):function(e,t,n,r){return Lm(e)&&!t&&!r&&!n}(n,o,a,i)?Xm(t,Vp,e):function(e,t,n,r,o){return Lm(e)&&!r&&!n&&(t||o)}(n,o,r,a,i)?Xm(t,$p,e):function(e,t,n){return function(e){return"ArrowUp"===e}(e)&&!t&&!n}(n,o,i)?Xm(t,Up,e):function(e,t,n){return function(e){return"ArrowDown"===e}(e)&&!t&&!n}(n,o,i)?Xm(t,Kp,e):function(e,t){return Fm(e)&&t}(n,r)?(ig=!0,Xm(t,qp,e)):function(e){return" "===e}(n)?Xm(t,Hp,e):function(e,t){return hh&&t&&"o"===e.toLowerCase()}(n,o)?(e.preventDefault(),ig=!0,Xm(t,Cp,!0)):function(e,t){return Fm(e)&&!t}(n,r)?(ig=!1,Xm(t,qp,e)):function(e,t,n,r){return hh?!t&&!n&&(Wm(e)||"h"===e.toLowerCase()&&r):!(r||t||n)&&Wm(e)}(n,a,i,o)?Wm(n)?Xm(t,Yp,e):(e.preventDefault(),Xm(t,Pp,!0)):function(e){return"Escape"===e}(n)?Xm(t,Xp,e):function(e,t,n,r,o){return hh?!(n||r||o)&&(Vm(e)||"d"===e.toLowerCase()&&t):!(t||r||o)&&Vm(e)}(n,o,r,a,i)?Vm(n)?Xm(t,Gp,e):(e.preventDefault(),Xm(t,Pp,!1)):function(e,t,n){return Wm(e)&&(hh?t:n)}(n,a,o)?(e.preventDefault(),Xm(t,Dp,!0)):function(e,t,n){return Vm(e)&&(hh?t:n)}(n,a,o)?(e.preventDefault(),Xm(t,Dp,!1)):function(e,t){return hh&&t&&Wm(e)}(n,i)?(e.preventDefault(),Xm(t,Ip,!0)):function(e,t){return hh&&t&&Vm(e)}(n,i)?(e.preventDefault(),Xm(t,Ip,!1)):function(e,t,n,r){return"b"===e.toLowerCase()&&!t&&Bm(n,r)}(n,a,i,o)?(e.preventDefault(),Xm(t,Rp,"bold")):function(e,t,n,r){return"u"===e.toLowerCase()&&!t&&Bm(n,r)}(n,a,i,o)?(e.preventDefault(),Xm(t,Rp,"underline")):function(e,t,n,r){return"i"===e.toLowerCase()&&!t&&Bm(n,r)}(n,a,i,o)?(e.preventDefault(),Xm(t,Rp,"italic")):function(e,t,n,r){return"Tab"===e&&!t&&!n&&!r}(n,a,o,i)?Xm(t,Zp,e):function(e,t,n,r){return"z"===e.toLowerCase()&&!t&&Bm(n,r)}(n,r,i,o)?(e.preventDefault(),Xm(t,Lp,void 0)):function(e,t,n,r){return hh?"z"===e.toLowerCase()&&n&&t:"y"===e.toLowerCase()&&r||"z"===e.toLowerCase()&&r&&t}(n,r,i,o)?(e.preventDefault(),Xm(t,zp,void 0)):Qg(t._editorState._selection)?function(e,t,n,r){return!t&&"c"===e.toLowerCase()&&(hh?n:r)}(n,r,i,o)?(e.preventDefault(),Xm(t,nh,e)):function(e,t,n,r){return!t&&"x"===e.toLowerCase()&&(hh?n:r)}(n,r,i,o)?(e.preventDefault(),Xm(t,rh,e)):$m(n,i,o)&&(e.preventDefault(),Xm(t,oh,e)):!mh&&$m(n,i,o)&&(e.preventDefault(),Xm(t,oh,e)),function(e,t,n,r){return e||t||n||r}(o,r,a,i)&&Xm(t,fh,e))}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;n instanceof Node&&"touch"!==r&&Bv(t,(()=>{Uv(Sm(n))||(og=!0)}))}],["compositionstart",function(e,t){Bv(t,(()=>{const n=uv();if(Zg(n)&&!t.isComposing()){const r=n.anchor,o=n.anchor.getNode();bm(r.key),(e.timeStamp<Jy+30||"element"===r.type||!n.isCollapsed()||o.getFormat()!==n.format||Wg(o)&&o.getStyle()!==n.style)&&Xm(t,Ap,Dh)}}))}],["compositionend",function(e,t){mh?ag=!0:Bv(t,(()=>{dg(t,e.data)}))}],["input",function(e,t){e.stopPropagation(),Bv(t,(()=>{const n=uv(),r=e.data,o=fg(e);if(null!=r&&Zg(n)&&lg(n,o,r,e.timeStamp,!1)){ag&&(dg(t,r),ag=!1);const o=n.anchor.getNode(),i=ay(t._window);if(null===i)return;const a=n.isBackward(),s=a?n.anchor.offset:n.focus.offset,l=a?n.focus.offset:n.anchor.offset;yh&&!n.isCollapsed()&&Wg(o)&&null!==i.anchorNode&&o.getTextContent().slice(0,s)+r+o.getTextContent().slice(s+l)===Dm(i.anchorNode)||Xm(t,Ap,r);const c=r.length;mh&&c>1&&"insertCompositionText"===e.inputType&&!t.isComposing()&&(n.anchor.offset-=c),gh||vh||_h||!t.isComposing()||(Jy=0,bm(null))}else Im(!1,t,null!==r?r:void 0),ag&&(dg(t,r||void 0),ag=!1);kv(),em(Pv())})),tg=null}],["click",function(e,t){Bv(t,(()=>{const n=uv(),r=ay(t._window),o=fv();if(r)if(Zg(n)){const t=n.anchor,i=t.getNode();"element"===t.type&&0===t.offset&&n.isCollapsed()&&!qv(i)&&1===jm().getChildrenSize()&&i.getTopLevelElementOrThrow().isEmpty()&&null!==o&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):3===e.detail&&!n.isCollapsed()&&i!==n.focus.getNode()&&(Wv(i)?i.select(0):i.getParentOrThrow().select(0))}else if("touch"===e.pointerType){const n=r.anchorNode;if(null!==n){const i=n.nodeType;(1===i||3===i)&&Pm(cv(o,r,t,e))}}Xm(t,Ep,e)}))}],["cut",Gy],["copy",Gy],["dragstart",Gy],["dragover",Gy],["dragend",Gy],["paste",Gy],["focus",Gy],["blur",Gy],["drop",Gy]];yh&&Zy.push(["beforeinput",(e,t)=>function(e,t){const n=e.inputType,r=fg(e);"deleteCompositionText"===n||mh&&Ym(t)||"insertCompositionText"!==n&&Bv(t,(()=>{const o=uv();if("deleteContentBackward"===n){if(null===o){const e=fv();if(!Zg(e))return;Pm(e.clone())}if(Zg(o)){const n=o.anchor.key===o.focus.key;if(i=e.timeStamp,"MediaLast"===Qy&&i<Jy+30&&t.isComposing()&&n){if(bm(null),Jy=0,setTimeout((()=>{Bv(t,(()=>{bm(null)}))}),30),Zg(o)){const e=o.anchor.getNode();e.markDirty(),o.format=e.getFormat(),Wg(e)||Kh(142),o.style=e.getStyle()}}else{bm(null),e.preventDefault();const r=o.anchor.getNode().getTextContent(),i=0===o.anchor.offset&&o.focus.offset===r.length;wh&&n&&!i||Xm(t,Pp,!0)}return}}var i;if(!Zg(o))return;const a=e.data;null!==tg&&Im(!1,t,tg),o.dirty&&null===tg||!o.isCollapsed()||qv(o.anchor.getNode())||null===r||o.applyDOMRange(r),tg=null;const s=o.anchor,l=o.focus,c=s.getNode(),u=l.getNode();if("insertText"!==n&&"insertTranspose"!==n)switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Xm(t,Ap,e);break;case"insertFromComposition":bm(null),Xm(t,Ap,e);break;case"insertLineBreak":bm(null),Xm(t,Cp,!1);break;case"insertParagraph":bm(null),ig&&!vh?(ig=!1,Xm(t,Cp,!1)):Xm(t,Tp,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Xm(t,Mp,e);break;case"deleteByComposition":((f=c)!==(d=u)||Wv(f)||Wv(d)||!f.isToken()||!d.isToken())&&Xm(t,Np,e);break;case"deleteByDrag":case"deleteByCut":Xm(t,Np,e);break;case"deleteContent":Xm(t,Pp,!1);break;case"deleteWordBackward":Xm(t,Dp,!0);break;case"deleteWordForward":Xm(t,Dp,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Xm(t,Ip,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Xm(t,Ip,!1);break;case"formatStrikeThrough":Xm(t,Rp,"strikethrough");break;case"formatBold":Xm(t,Rp,"bold");break;case"formatItalic":Xm(t,Rp,"italic");break;case"formatUnderline":Xm(t,Rp,"underline");break;case"historyUndo":Xm(t,Lp,void 0);break;case"historyRedo":Xm(t,zp,void 0)}else{if("\n"===a)e.preventDefault(),Xm(t,Cp,!1);else if(a===Nh)e.preventDefault(),Xm(t,Tp,void 0);else if(null==a&&e.dataTransfer){const t=e.dataTransfer.getData("text/plain");e.preventDefault(),o.insertRawText(t)}else null!=a&&lg(o,r,a,e.timeStamp,!0)?(e.preventDefault(),Xm(t,Ap,a)):tg=a;eg=e.timeStamp}var f,d}))}(e,t)]);let Jy=0,Qy=null,eg=0,tg=null;const ng=new WeakMap;let rg=!1,og=!1,ig=!1,ag=!1,sg=[0,"",0,"root",0];function lg(e,t,n,r,o){const i=e.anchor,a=e.focus,s=i.getNode(),l=Pv(),c=ay(l._window),u=null!==c?c.anchorNode:null,f=i.key,d=l.getElementByKey(f),p=n.length;return f!==a.key||!Wg(s)||(!o&&(!yh||eg<r+50)||s.isDirty()&&p<2||Am(n))&&i.offset!==a.offset&&!s.isComposing()||pm(s)||s.isDirty()&&p>1||(o||!yh)&&null!==d&&!s.isComposing()&&u!==mm(d)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;const n=e.anchor.offset,r=t.getParentOrThrow(),o=t.isToken();return 0===n?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||o||function(e){const t=e.getPreviousSibling();return(Wg(t)||Wv(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):n===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||o)}(e,s)}function cg(e,t){return null!==e&&null!==e.nodeValue&&3===e.nodeType&&0!==t&&t!==e.nodeValue.length}function ug(e,t,n){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:a}=e;rg&&(rg=!1,cg(r,o)&&cg(i,a))||Bv(t,(()=>{if(!n)return void Pm(null);if(!cm(t,r,i))return;const s=uv();if(Zg(s)){const n=s.anchor,r=n.getNode();if(s.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(s.dirty=!0);const o=ey(t).event,i=o?o.timeStamp:performance.now(),[a,l,c,u,f]=sg,d=jm(),p=!1===t.isComposing()&&""===d.getTextContent();if(i<f+200&&n.offset===c&&n.key===u)s.format=a,s.style=l;else if("text"===n.type)Wg(r)||Kh(141),s.format=r.getFormat(),s.style=r.getStyle();else if("element"===n.type&&!p){const e=n.getNode();s.style="",e instanceof Zv&&0===e.getChildrenSize()?(s.format=e.getTextFormat(),s.style=e.getTextStyle()):s.format=0}}else{const e=n.key,t=s.focus.key,r=s.getNodes(),i=r.length,l=s.isBackward(),c=l?a:o,u=l?o:a,f=l?t:e,d=l?e:t;let p=255,h=!1;for(let e=0;e<i;e++){const t=r[e],n=t.getTextContentSize();if(Wg(t)&&0!==n&&!(0===e&&t.__key===f&&c===n||e===i-1&&t.__key===d&&0===u)&&(h=!0,p&=t.getFormat(),0===p))break}s.format=h?p:0}}Xm(t,jp,void 0)}))}function fg(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return 0===t.length?null:t[0]}function dg(e,t){const n=e._compositionKey;if(bm(null),null!==n&&null!=t){if(""===t){const t=wm(n),r=mm(e.getElementByKey(n));return void(null!==r&&null!==r.nodeValue&&Wg(t)&&Rm(t,r.nodeValue,null,null,!0))}if("\n"===t[t.length-1]){const t=uv();if(Zg(t)){const n=t.focus;return t.anchor.set(n.key,n.offset,n.type),void Xm(e,qp,null)}}}Im(!0,e,t)}function pg(e){let t=e.__lexicalEventHandles;return void 0===t&&(t=[],e.__lexicalEventHandles=t),t}const hg=new Map;function mg(e){const t=e.target,n=ay(null==t?null:9===t.nodeType?t.defaultView:t.ownerDocument.defaultView);if(null===n)return;const r=fm(n.anchorNode);if(null===r)return;og&&(og=!1,Bv(r,(()=>{const t=fv(),o=n.anchorNode;if(null===o)return;const i=o.nodeType;1!==i&&3!==i||Pm(cv(t,n,r,e))})));const o=Mm(r),i=o[o.length-1],a=i._key,s=hg.get(a),l=s||i;l!==r&&ug(n,l,!1),ug(n,r,!0),r!==i?hg.set(a,r):s&&hg.delete(a)}function yg(e){e._lexicalHandled=!0}function gg(e){return!0===e._lexicalHandled}function vg(e,t,n){kv();const r=e.__key,o=e.getParent();if(null===o)return;const i=function(e){const t=uv();if(!Zg(t)||!Wv(e))return t;const{anchor:n,focus:r}=t,o=n.getNode(),i=r.getNode();return Qm(o,e)&&n.set(e.__key,0,"element"),Qm(i,e)&&r.set(e.__key,0,"element"),t}(e);let a=!1;if(Zg(i)&&t){const t=i.anchor,n=i.focus;t.key===r&&(hv(t,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0),n.key===r&&(hv(n,e,o,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else Qg(i)&&t&&e.isSelected()&&e.selectPrevious();if(Zg(i)&&t&&!a){const t=e.getIndexWithinParent();gm(e),dv(i,o,t,-1)}else gm(e);n||ty(o)||o.canBeEmpty()||!o.isEmpty()||vg(o,t),t&&qv(o)&&o.isEmpty()&&o.selectEnd()}class bg{static getType(){Kh(64,this.name)}static clone(e){Kh(65,this.name)}afterCloneFrom(e){this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev}constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,function(e,t){if(null!=t)return void(e.__key=t);kv(),jv();const n=Pv(),r=Ev(),o=""+am++;r._nodeMap.set(o,e),Wv(e)?n._dirtyElements.set(o,!0):n._dirtyLeaves.add(o),n._cloneNotNeeded.add(o),n._dirtyType=1,e.__key=o}(this,e)}getType(){return this.__type}isInline(){Kh(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;const t=wm(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){const t=e||uv();if(null==t)return!1;const n=t.getNodes().some((e=>e.__key===this.__key));if(Wg(this))return n;if(Zg(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;const e=this.getParent();if(Uv(this)&&this.isInline()&&e){const n=t.isBackward()?t.focus:t.anchor,r=n.getNode();if(n.offset===r.getChildrenSize()&&r.is(e)&&r.getLastChildOrThrow().is(this))return!1}}return n}getKey(){return this.__key}getIndexWithinParent(){const e=this.getParent();if(null===e)return-1;let t=e.getFirstChild(),n=0;for(;null!==t;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){const e=this.getLatest().__parent;return null===e?null:wm(e)}getParentOrThrow(){const e=this.getParent();return null===e&&Kh(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){const t=e.getParent();if(ty(t))return Wv(e)||e===this&&Uv(e)||Kh(194),e;e=t}return null}getTopLevelElementOrThrow(){const e=this.getTopLevelElement();return null===e&&Kh(67,this.__key),e}getParents(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){const e=[];let t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){const e=this.getLatest().__prev;return null===e?null:wm(e)}getPreviousSiblings(){const e=[],t=this.getParent();if(null===t)return e;let n=t.getFirstChild();for(;null!==n&&!n.is(this);)e.push(n),n=n.getNextSibling();return e}getNextSibling(){const e=this.getLatest().__next;return null===e?null:wm(e)}getNextSiblings(){const e=[];let t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){const t=this.getParents(),n=e.getParents();Wv(this)&&t.unshift(this),Wv(e)&&n.unshift(e);const r=t.length,o=n.length;if(0===r||0===o||t[r-1]!==n[o-1])return null;const i=new Set(n);for(let e=0;e<r;e++){const n=t[e];if(i.has(n))return n}return null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){if(this===e)return!1;if(e.isParentOf(this))return!0;if(this.isParentOf(e))return!1;const t=this.getCommonAncestor(e);let n=0,r=0,o=this;for(;;){const e=o.getParentOrThrow();if(e===t){n=o.getIndexWithinParent();break}o=e}for(o=e;;){const e=o.getParentOrThrow();if(e===t){r=o.getIndexWithinParent();break}o=e}return n<r}isParentOf(e){const t=this.__key;if(t===e.__key)return!1;let n=e;for(;null!==n;){if(n.__key===t)return!0;n=n.getParent()}return!1}getNodesBetween(e){const t=this.isBefore(e),n=[],r=new Set;let o=this;for(;null!==o;){const i=o.__key;if(r.has(i)||(r.add(i),n.push(o)),o===e)break;const a=Wv(o)?t?o.getFirstChild():o.getLastChild():null;if(null!==a){o=a;continue}const s=t?o.getNextSibling():o.getPreviousSibling();if(null!==s){o=s;continue}const l=o.getParentOrThrow();if(r.has(l.__key)||n.push(l),l===e)break;let c=null,u=l;do{if(null===u&&Kh(68),c=t?u.getNextSibling():u.getPreviousSibling(),u=u.getParent(),null===u)break;null!==c||r.has(u.__key)||n.push(u)}while(null===c);o=c}return t||n.reverse(),n}isDirty(){const e=Pv()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){const e=wm(this.__key);return null===e&&Kh(113),e}getWritable(){kv();const e=Ev(),t=Pv(),n=e._nodeMap,r=this.__key,o=this.getLatest(),i=t._cloneNotNeeded,a=uv();if(null!==a&&a.setCachedNodes(null),i.has(r))return vm(o),o;const s=hy(o);return i.add(r),vm(s),n.set(r,s),s}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){Kh(70)}updateDOM(e,t,n){Kh(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){Kh(72)}static importJSON(e){Kh(18,this.name)}static transform(){return null}remove(e){vg(this,!0,e)}replace(e,t){kv();let n=uv();null!==n&&(n=n.clone()),ry(this,e);const r=this.getLatest(),o=this.__key,i=e.__key,a=e.getWritable(),s=this.getParentOrThrow().getWritable(),l=s.__size;gm(a);const c=r.getPreviousSibling(),u=r.getNextSibling(),f=r.__prev,d=r.__next,p=r.__parent;if(vg(r,!1,!0),null===c?s.__first=i:c.getWritable().__next=i,a.__prev=f,null===u?s.__last=i:u.getWritable().__prev=i,a.__next=d,a.__parent=p,s.__size=l,t&&(Wv(this)&&Wv(a)||Kh(139),this.getChildren().forEach((e=>{a.append(e)}))),Zg(n)){Pm(n);const e=n.anchor,t=n.focus;e.key===o&&Yg(e,a),t.key===o&&Yg(t,a)}return xm()===o&&bm(i),a}insertAfter(e,t=!0){kv(),ry(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.getParent(),i=uv();let a=!1,s=!1;if(null!==o){const t=e.getIndexWithinParent();if(gm(r),Zg(i)){const e=o.__key,n=i.anchor,r=i.focus;a="element"===n.type&&n.key===e&&n.offset===t+1,s="element"===r.type&&r.key===e&&r.offset===t+1}}const l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),u=r.__key,f=n.__next;if(null===l?c.__last=u:l.getWritable().__prev=u,c.__size++,n.__next=u,r.__next=f,r.__prev=n.__key,r.__parent=n.__parent,t&&Zg(i)){const e=this.getIndexWithinParent();dv(i,c,e+1);const t=c.__key;a&&i.anchor.set(t,e+2,"element"),s&&i.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){kv(),ry(this,e);const n=this.getWritable(),r=e.getWritable(),o=r.__key;gm(r);const i=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),s=n.__prev,l=this.getIndexWithinParent();null===i?a.__first=o:i.getWritable().__next=o,a.__size++,n.__prev=o,r.__prev=s,r.__next=n.__key,r.__parent=n.__parent;const c=uv();return t&&Zg(c)&&dv(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return Qv()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){kv();const n=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===n)return r.select(0,0);if(Wv(n))return n.select();if(!Wg(n)){const e=n.getIndexWithinParent()+1;return r.select(e,e)}return n.select(e,t)}selectNext(e,t){kv();const n=this.getNextSibling(),r=this.getParentOrThrow();if(null===n)return r.select();if(Wv(n))return n.select(0,0);if(!Wg(n)){const e=n.getIndexWithinParent();return r.select(e,e)}return n.select(e,t)}markDirty(){this.getWritable()}}class xg extends bg{static getType(){return"linebreak"}static clone(e){return new xg(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:e=>function(e){const t=e.parentElement;if(null!==t&&cy(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&Og(n)){const n=t.lastChild;if(n===e||n.previousSibling===e&&Og(n))return!0}}return!1}(e)||function(e){const t=e.parentElement;if(null!==t&&cy(t)){const n=t.firstChild;if(n===e||n.nextSibling===e&&Og(n))return!1;const r=t.lastChild;if(r===e||r.previousSibling===e&&Og(r))return!0}return!1}(e)?null:{conversion:wg,priority:0}}}static importJSON(e){return _g()}exportJSON(){return{type:"linebreak",version:1}}}function wg(e){return{node:_g()}}function _g(){return ny(new xg)}function Sg(e){return e instanceof xg}function Og(e){return 3===e.nodeType&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function kg(e,t){return 16&t?"code":128&t?"mark":32&t?"sub":64&t?"sup":null}function jg(e,t){return 1&t?"strong":2&t?"em":"span"}function Eg(e,t,n,r,o){const i=r.classList;let a=Um(o,"base");void 0!==a&&i.add(...a),a=Um(o,"underlineStrikethrough");let s=!1;const l=8&t&&4&t;void 0!==a&&(8&n&&4&n?(s=!0,l||i.add(...a)):l&&i.remove(...a));for(const e in Bh){const r=Bh[e];if(a=Um(o,e),void 0!==a)if(n&r){if(s&&("underline"===e||"strikethrough"===e)){t&r&&i.remove(...a);continue}t&r&&(!l||"underline"!==e)&&"strikethrough"!==e||i.add(...a)}else t&r&&i.remove(...a)}}function Pg(e,t,n){const r=t.firstChild,o=n.isComposing(),i=e+(o?Mh:"");if(null==r)t.textContent=i;else{const e=r.nodeValue;if(e!==i)if(o||mh){const[t,n,o]=function(e,t){const n=e.length,r=t.length;let o=0,i=0;for(;o<n&&o<r&&e[o]===t[o];)o++;for(;i+o<n&&i+o<r&&e[n-i-1]===t[r-i-1];)i++;return[o,n-o-i,t.slice(o,r-i)]}(e,i);0!==n&&r.deleteData(t,n),r.insertData(t,o)}else r.nodeValue=i}}function Cg(e,t,n,r,o,i){Pg(o,e,t);const a=i.theme.text;void 0!==a&&Eg(0,0,r,e,a)}function Tg(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Ag extends bg{static getType(){return"text"}static clone(e){return new Ag(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e,t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const e=this.getLatest();return Uh[e.__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===xm()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){const t=Bh[e];return!!(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return ym(this.getLatest().__format,e,t)}canHaveFormat(){return!0}createDOM(e,t){const n=this.__format,r=kg(0,n),o=jg(0,n),i=null===r?o:r,a=document.createElement(i);let s=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(s=document.createElement(o),a.appendChild(s)),Cg(s,this,0,n,this.__text,e);const l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,n){const r=this.__text,o=e.__format,i=this.__format,a=kg(0,o),s=kg(0,i),l=jg(0,o),c=jg(0,i);if((null===a?l:a)!==(null===s?c:s))return!0;if(a===s&&l!==c){const e=t.firstChild;null==e&&Kh(48);const o=document.createElement(c);return Cg(o,this,0,i,r,n),t.replaceChild(o,e),!1}let u=t;null!==s&&null!==a&&(u=t.firstChild,null==u&&Kh(49)),Pg(r,u,this);const f=n.theme.text;void 0!==f&&o!==i&&Eg(0,o,i,u,f);const d=e.__style,p=this.__style;return d!==p&&(t.style.cssText=p),!1}static importDOM(){return{"#text":()=>({conversion:Rg,priority:0}),b:()=>({conversion:Ng,priority:0}),code:()=>({conversion:Bg,priority:0}),em:()=>({conversion:Bg,priority:0}),i:()=>({conversion:Bg,priority:0}),s:()=>({conversion:Bg,priority:0}),span:()=>({conversion:Mg,priority:0}),strong:()=>({conversion:Bg,priority:0}),sub:()=>({conversion:Bg,priority:0}),sup:()=>({conversion:Bg,priority:0}),u:()=>({conversion:Bg,priority:0})}}static importJSON(e){const t=Fg(e.text);return t.setFormat(e.format),t.setDetail(e.detail),t.setMode(e.mode),t.setStyle(e.style),t}exportDOM(e){let{element:t}=super.exportDOM(e);return null!==t&&sy(t)||Kh(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=Tg(t,"b")),this.hasFormat("italic")&&(t=Tg(t,"i")),this.hasFormat("strikethrough")&&(t=Tg(t,"s")),this.hasFormat("underline")&&(t=Tg(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(e,t){}setFormat(e){const t=this.getWritable();return t.__format="string"==typeof e?Bh[e]:e,t}setDetail(e){const t=this.getWritable();return t.__detail="string"==typeof e?Fh[e]:e,t}setStyle(e){const t=this.getWritable();return t.__style=e,t}toggleFormat(e){const t=ym(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){const e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){const e=this.getWritable();return e.__detail^=2,e}setMode(e){const t=$h[e];if(this.__mode===t)return this;const n=this.getWritable();return n.__mode=t,n}setTextContent(e){if(this.__text===e)return this;const t=this.getWritable();return t.__text=e,t}select(e,t){kv();let n=e,r=t;const o=uv(),i=this.getTextContent(),a=this.__key;if("string"==typeof i){const e=i.length;void 0===n&&(n=e),void 0===r&&(r=e)}else n=0,r=0;if(!Zg(o))return sv(a,n,a,r,"text","text");{const e=xm();e!==o.anchor.key&&e!==o.focus.key||bm(a),o.setTextNodeRange(this,n,this,r)}return o}selectStart(){return this.select(0,0)}selectEnd(){const e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,n,r){const o=this.getWritable(),i=o.__text,a=n.length;let s=e;s<0&&(s=a+s,s<0&&(s=0));const l=uv();if(r&&Zg(l)){const t=e+a;l.setTextNodeRange(o,t,o,t)}const c=i.slice(0,s)+n+i.slice(s+t);return o.__text=c,o}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){kv();const t=this.getLatest(),n=t.getTextContent(),r=t.__key,o=xm(),i=new Set(e),a=[],s=n.length;let l="";for(let e=0;e<s;e++)""!==l&&i.has(e)&&(a.push(l),l=""),l+=n[e];""!==l&&a.push(l);const c=a.length;if(0===c)return[];if(a[0]===n)return[t];const u=a[0],f=t.getParent();let d;const p=t.getFormat(),h=t.getStyle(),m=t.__detail;let y=!1;t.isSegmented()?(d=Fg(u),d.__format=p,d.__style=h,d.__detail=m,y=!0):(d=t.getWritable(),d.__text=u);const g=uv(),v=[d];let b=u.length;for(let e=1;e<c;e++){const t=a[e],n=t.length,i=Fg(t).getWritable();i.__format=p,i.__style=h,i.__detail=m;const s=i.__key,l=b+n;if(Zg(g)){const e=g.anchor,t=g.focus;e.key===r&&"text"===e.type&&e.offset>b&&e.offset<=l&&(e.key=s,e.offset-=b,g.dirty=!0),t.key===r&&"text"===t.type&&t.offset>b&&t.offset<=l&&(t.key=s,t.offset-=b,g.dirty=!0)}o===r&&bm(s),b=l,v.push(i)}if(null!==f){!function(e){const t=e.getPreviousSibling(),n=e.getNextSibling();null!==t&&vm(t),null!==n&&vm(n)}(this);const e=f.getWritable(),t=this.getIndexWithinParent();y?(e.splice(t,0,v),this.remove()):e.splice(t,1,v),Zg(g)&&dv(g,f,t,c-1)}return v}mergeWithSibling(e){const t=e===this.getPreviousSibling();t||e===this.getNextSibling()||Kh(50);const n=this.__key,r=e.__key,o=this.__text,i=o.length;xm()===r&&bm(n);const a=uv();if(Zg(a)){const o=a.anchor,s=a.focus;null!==o&&o.key===r&&(mv(o,t,n,e,i),a.dirty=!0),null!==s&&s.key===r&&(mv(s,t,n,e,i),a.dirty=!0)}const s=e.__text,l=t?s+o:o+s;this.setTextContent(l);const c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function Mg(e){return{forChild:Vg(e.style),node:null}}function Ng(e){const t=e,n="normal"===t.style.fontWeight;return{forChild:Vg(t.style,n?void 0:"bold"),node:null}}const Dg=new WeakMap;function Ig(e){return"PRE"===e.nodeName||1===e.nodeType&&void 0!==e.style&&void 0!==e.style.whiteSpace&&e.style.whiteSpace.startsWith("pre")}function Rg(e){const t=e;null===e.parentElement&&Kh(129);let n=t.textContent||"";if(null!==function(e){let t,n=e.parentNode;const r=[e];for(;null!==n&&void 0===(t=Dg.get(n))&&!Ig(n);)r.push(n),n=n.parentNode;const o=void 0===t?n:t;for(let e=0;e<r.length;e++)Dg.set(r[e],o);return o}(t)){const e=n.split(/(\r?\n|\t)/),t=[],r=e.length;for(let n=0;n<r;n++){const r=e[n];"\n"===r||"\r\n"===r?t.push(_g()):"\t"===r?t.push(Ug()):""!==r&&t.push(Fg(r))}return{node:t}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),""===n)return{node:null};if(" "===n[0]){let e=t,r=!0;for(;null!==e&&null!==(e=Lg(e,!1));){const t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(n=n.slice(1)),r=!1;break}}r&&(n=n.slice(1))}if(" "===n[n.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=Lg(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(n=n.slice(0,n.length-1))}return""===n?{node:null}:{node:Fg(n)}}function Lg(e,t){let n=e;for(;;){let e;for(;null===(e=t?n.nextSibling:n.previousSibling);){const e=n.parentElement;if(null===e)return null;n=e}if(n=e,1===n.nodeType){const e=n.style.display;if(""===e&&!ly(n)||""!==e&&!e.startsWith("inline"))return null}let r=n;for(;null!==(r=t?n.firstChild:n.lastChild);)n=r;if(3===n.nodeType)return n;if("BR"===n.nodeName)return null}}const zg={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Bg(e){const t=zg[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:Vg(e.style,t),node:null}}function Fg(e=""){return ny(new Ag(e))}function Wg(e){return e instanceof Ag}function Vg(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),o="700"===n||"bold"===n,i=r.includes("line-through"),a="italic"===e.fontStyle,s=r.includes("underline"),l=e.verticalAlign;return e=>(Wg(e)&&(o&&!e.hasFormat("bold")&&e.toggleFormat("bold"),i&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),s&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class $g extends Ag{static getType(){return"tab"}static clone(e){return new $g(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text}constructor(e){super("\t",e),this.__detail=2}static importDOM(){return null}static importJSON(e){const t=Ug();return t.setFormat(e.format),t.setStyle(e.style),t}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(e){Kh(126)}setDetail(e){Kh(127)}setMode(e){Kh(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ug(){return ny(new $g)}class Kg{constructor(e,t,n){this._selection=null,this.key=e,this.offset=t,this.type=n}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){let t=this.getNode(),n=e.getNode();const r=this.offset,o=e.offset;if(Wv(t)){const e=t.getDescendantByIndex(r);t=e??t}if(Wv(n)){const e=n.getDescendantByIndex(o);n=e??n}return t===n?r<o:t.isBefore(n)}getNode(){const e=wm(this.key);return null===e&&Kh(20),e}set(e,t,n){const r=this._selection,o=this.key;this.key=e,this.offset=t,this.type=n,Ov()||(xm()===o&&bm(e),null!==r&&(r.setCachedNodes(null),r.dirty=!0))}}function qg(e,t,n){return new Kg(e,t,n)}function Hg(e,t){let n=t.__key,r=e.offset,o="element";if(Wg(t)){o="text";const e=t.getTextContentSize();r>e&&(r=e)}else if(!Wv(t)){const e=t.getNextSibling();if(Wg(e))n=e.__key,r=0,o="text";else{const e=t.getParent();e&&(n=e.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,o)}function Yg(e,t){if(Wv(t)){const n=t.getLastDescendant();Wv(n)||Wg(n)?Hg(e,n):Hg(e,t)}else Hg(e,t)}function Xg(e,t,n,r){e.key=t,e.offset=n,e.type=r}let Gg=class e{constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!Qg(e))return!1;const t=this._nodes,n=e._nodes;return t.size===n.size&&Array.from(t).every((e=>n.has(e)))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new e(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){const t=this.getNodes(),n=t.length,r=t[n-1];let o;if(Wg(r))o=r.select();else{const e=r.getIndexWithinParent()+1;o=r.getParentOrThrow().select(e,e)}o.insertNodes(e);for(let e=0;e<n;e++)t[e].remove()}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this._nodes,n=[];for(const e of t){const t=wm(e);null!==t&&n.push(t)}return Ov()||(this._cachedNodes=n),n}getTextContent(){const e=this.getNodes();let t="";for(let n=0;n<e.length;n++)t+=e[n].getTextContent();return t}};function Zg(e){return e instanceof Jg}class Jg{constructor(e,t,n,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=n,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!Zg(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const e=this._cachedNodes;if(null!==e)return e;const t=this.anchor,n=this.focus,r=t.isBefore(n),o=r?t:n,i=r?n:t;let a=o.getNode(),s=i.getNode();const l=o.offset,c=i.offset;if(Wv(a)){const e=a.getDescendantByIndex(l);a=e??a}if(Wv(s)){let e=s.getDescendantByIndex(c);null!==e&&e!==a&&s.getChildAtIndex(c)===e&&(e=e.getPreviousSibling()),s=e??s}let u;return u=a.is(s)?Wv(a)&&a.getChildrenSize()>0?[]:[a]:a.getNodesBetween(s),Ov()||(this._cachedNodes=u),u}setTextNodeRange(e,t,n,r){Xg(this.anchor,e.__key,t,"text"),Xg(this.focus,n.__key,r,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){const e=this.getNodes();if(0===e.length)return"";const t=e[0],n=e[e.length-1],r=this.anchor,o=this.focus,i=r.isBefore(o),[a,s]=tv(this);let l="",c=!0;for(let u=0;u<e.length;u++){const f=e[u];if(Wv(f)&&!f.isInline())c||(l+="\n"),c=!f.isEmpty();else if(c=!1,Wg(f)){let e=f.getTextContent();f===t?f===n?"element"===r.type&&"element"===o.type&&o.offset!==r.offset||(e=a<s?e.slice(a,s):e.slice(s,a)):e=i?e.slice(a):e.slice(s):f===n&&(e=i?e.slice(0,s):e.slice(0,a)),l+=e}else!Uv(f)&&!Sg(f)||f===n&&this.isCollapsed()||(l+=f.getTextContent())}return l}applyDOMRange(e){const t=Pv(),n=t.getEditorState()._selection,r=av(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,n);if(null===r)return;const[o,i]=r;Xg(this.anchor,o.key,o.offset,o.type),Xg(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}clone(){const e=this.anchor,t=this.focus;return new Jg(qg(e.key,e.offset,e.type),qg(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=ym(this.format,e,null),this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){const t=Bh[e];return!!(this.format&t)}insertRawText(e){const t=e.split(/(\r?\n|\t)/),n=[],r=t.length;for(let e=0;e<r;e++){const r=t[e];"\n"===r||"\r\n"===r?n.push(_g()):"\t"===r?n.push(Ug()):n.push(Fg(r))}this.insertNodes(n)}insertText(e){const t=this.anchor,n=this.focus,r=this.format,o=this.style;let i=t,a=n;!this.isCollapsed()&&n.isBefore(t)&&(i=n,a=t),"element"===i.type&&function(e,t,n,r){const o=e.getNode(),i=o.getChildAtIndex(e.offset),a=Fg(),s=qv(o)?Qv().append(a):a;a.setFormat(n),a.setStyle(r),null===i?o.append(s):i.insertBefore(s),e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(i,a,r,o);const s=i.offset;let l=a.offset;const c=this.getNodes(),u=c.length;let f=c[0];Wg(f)||Kh(26);const d=f.getTextContent().length,p=f.getParentOrThrow();let h=c[u-1];if(1===u&&"element"===a.type&&(l=d,a.set(i.key,l,"text")),this.isCollapsed()&&s===d&&(f.isSegmented()||f.isToken()||!f.canInsertTextAfter()||!p.canInsertTextAfter()&&null===f.getNextSibling())){let t=f.getNextSibling();if(Wg(t)&&t.canInsertTextBefore()&&!pm(t)||(t=Fg(),t.setFormat(r),t.setStyle(o),p.canInsertTextAfter()?f.insertAfter(t):p.insertAfter(t)),t.select(0,0),f=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===s&&(f.isSegmented()||f.isToken()||!f.canInsertTextBefore()||!p.canInsertTextBefore()&&null===f.getPreviousSibling())){let t=f.getPreviousSibling();if(Wg(t)&&!pm(t)||(t=Fg(),t.setFormat(r),p.canInsertTextBefore()?f.insertBefore(t):p.insertBefore(t)),t.select(),f=t,""!==e)return void this.insertText(e)}else if(f.isSegmented()&&s!==d){const e=Fg(f.getTextContent());e.setFormat(r),f.replace(e),f=e}else if(!this.isCollapsed()&&""!==e){const t=h.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Wv(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),iv(this.anchor,this.focus,null),void this.insertText(e)}if(1===u){if(f.isToken()){const t=Fg(e);return t.select(),void f.replace(t)}const t=f.getFormat(),n=f.getStyle();if(s!==l||t===r&&n===o){if(function(e){return e instanceof $g}(f)){const t=Fg(e);return t.setFormat(r),t.setStyle(o),t.select(),void f.replace(t)}}else{if(""!==f.getTextContent()){const t=Fg(e);if(t.setFormat(r),t.setStyle(o),t.select(),0===s)f.insertBefore(t,!1);else{const[e]=f.splitText(s);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}f.setFormat(r),f.setStyle(o)}const i=l-s;f=f.spliceText(s,i,e,!0),""===f.getTextContent()?f.remove():"text"===this.anchor.type&&(f.isComposing()?this.anchor.offset-=e.length:(this.format=t,this.style=n))}else{const t=new Set([...f.getParentKeys(),...h.getParentKeys()]),n=Wv(f)?f:f.getParentOrThrow();let r=Wv(h)?h:h.getParentOrThrow(),o=h;if(!n.is(r)&&r.isInline())do{o=r,r=r.getParentOrThrow()}while(r.isInline());if("text"===a.type&&(0!==l||""===h.getTextContent())||"element"===a.type&&h.getIndexWithinParent()<l)if(Wg(h)&&!h.isToken()&&l!==h.getTextContentSize()){if(h.isSegmented()){const e=Fg(h.getTextContent());h.replace(e),h=e}qv(a.getNode())||"text"!==a.type||(h=h.spliceText(0,l,"")),t.add(h.__key)}else{const e=h.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?h.remove():e.remove()}else t.add(h.__key);const i=r.getChildren(),p=new Set(c),m=n.is(r),y=n.isInline()&&null===f.getNextSibling()?n:f;for(let e=i.length-1;e>=0;e--){const t=i[e];if(t.is(f)||Wv(t)&&t.isParentOf(f))break;t.isAttached()&&(!p.has(t)||t.is(o)?m||y.insertAfter(t,!1):t.remove())}if(!m){let e=r,n=null;for(;null!==e;){const r=e.getChildren(),o=r.length;(0===o||r[o-1].is(n))&&(t.delete(e.__key),n=e),e=e.getParent()}}if(f.isToken())if(s===d)f.select();else{const t=Fg(e);t.select(),f.replace(t)}else f=f.spliceText(s,d-s,e,!0),""===f.getTextContent()?f.remove():f.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length);for(let e=1;e<u;e++){const n=c[e],r=n.__key;t.has(r)||n.remove()}}}removeText(){this.insertText("")}formatText(e){if(this.isCollapsed())return this.toggleFormat(e),void bm(null);const t=this.getNodes(),n=[];for(const e of t)Wg(e)&&n.push(e);const r=n.length;if(0===r)return this.toggleFormat(e),void bm(null);const o=this.anchor,i=this.focus,a=this.isBackward(),s=a?i:o,l=a?o:i;let c=0,u=n[0],f="element"===s.type?0:s.offset;if("text"===s.type&&f===u.getTextContentSize()&&(c=1,u=n[1],f=0),null==u)return;const d=u.getFormatFlags(e,null),p=r-1;let h=n[p];const m="text"===l.type?l.offset:h.getTextContentSize();if(u.is(h)){if(f===m)return;if(pm(u)||0===f&&m===u.getTextContentSize())u.setFormat(d);else{const e=u.splitText(f,m),t=0===f?e[0]:e[1];t.setFormat(d),"text"===s.type&&s.set(t.__key,0,"text"),"text"===l.type&&l.set(t.__key,m-f,"text")}return void(this.format=d)}0===f||pm(u)||([,u]=u.splitText(f),f=0),u.setFormat(d);const y=h.getFormatFlags(e,d);m>0&&(m===h.getTextContentSize()||pm(h)||([h]=h.splitText(m)),h.setFormat(y));for(let t=c+1;t<p;t++){const r=n[t],o=r.getFormatFlags(e,y);r.setFormat(o)}"text"===s.type&&s.set(u.__key,f,"text"),"text"===l.type&&l.set(h.__key,m,"text"),this.format=d|y}insertNodes(e){if(0===e.length)return;if("root"===this.anchor.key){this.insertParagraph();const t=uv();return Zg(t)||Kh(134),t.insertNodes(e)}const t=fy((this.isBackward()?this.focus:this.anchor).getNode(),uy),n=e[e.length-1];if("__language"in t&&Wv(t)){if("__language"in e[0])this.insertText(e[0].getTextContent());else{const r=yv(this);t.splice(r,0,e),n.selectEnd()}return}if(!e.some((e=>(Wv(e)||Uv(e))&&!e.isInline()))){Wv(t)||Kh(135);const r=yv(this);return t.splice(r,0,e),void n.selectEnd()}const r=function(e){const t=Qv();let n=null;for(let r=0;r<e.length;r++){const o=e[r],i=Sg(o);if(i||Uv(o)&&o.isInline()||Wv(o)&&o.isInline()||Wg(o)||o.isParentRequired()){if(null===n&&(n=o.createParentElementNode(),t.append(n),i))continue;null!==n&&n.append(o)}else t.append(o),n=null}return t}(e),o=r.getLastDescendant(),i=r.getChildren(),a=Wv(t)&&t.isEmpty()?null:this.insertParagraph(),s=i[i.length-1];let l=i[0];var c;Wv(c=l)&&uy(c)&&!c.isEmpty()&&Wv(t)&&(!t.isEmpty()||t.canMergeWhenEmpty())&&(Wv(t)||Kh(135),t.append(...l.getChildren()),l=i[1]),l&&function(e,t){const n=t.getParentOrThrow().getLastChild();let r=t;const o=[t];for(;r!==n;)r.getNextSibling()||Kh(140),r=r.getNextSibling(),o.push(r);let i=e;for(const e of o)i=i.insertAfter(e)}(t,l);const u=fy(o,uy);a&&Wv(u)&&(a.canMergeWhenEmpty()||uy(s))&&(u.append(...a.getChildren()),a.remove()),Wv(t)&&t.isEmpty()&&t.remove(),o.selectEnd();const f=Wv(t)?t.getLastChild():null;Sg(f)&&u!==t&&f.remove()}insertParagraph(){if("root"===this.anchor.key){const e=Qv();return jm().splice(this.anchor.offset,0,[e]),e.select(),e}const e=yv(this),t=fy(this.anchor.getNode(),uy);Wv(t)||Kh(136);const n=t.getChildAtIndex(e),r=n?[n,...n.getNextSiblings()]:[],o=t.insertNewAfter(this,!1);return o?(o.append(...r),o.selectStart(),o):null}insertLineBreak(e){const t=_g();if(this.insertNodes([t]),e){const e=t.getParentOrThrow(),n=t.getIndexWithinParent();e.select(n,n)}}extract(){const e=this.getNodes(),t=e.length,n=t-1,r=this.anchor,o=this.focus;let i=e[0],a=e[n];const[s,l]=tv(this);if(0===t)return[];if(1===t){if(Wg(i)&&!this.isCollapsed()){const e=s>l?l:s,t=s>l?s:l,n=i.splitText(e,t),r=0===e?n[0]:n[1];return null!=r?[r]:[]}return[i]}const c=r.isBefore(o);if(Wg(i)){const t=c?s:l;t===i.getTextContentSize()?e.shift():0!==t&&([,i]=i.splitText(t),e[0]=i)}if(Wg(a)){const t=a.getTextContent().length,r=c?l:s;0===r?e.pop():r!==t&&([a]=a.splitText(r),e[n]=a)}return e}modify(e,t,n){const r=this.focus,o=this.anchor,i="move"===e,a=Hm(r,t);if(Uv(a)&&!a.isIsolated()){if(i&&a.isKeyboardSelectable()){const e=lv();return e.add(a.__key),void Pm(e)}const e=t?a.getPreviousSibling():a.getNextSibling();if(Wg(e)){const n=e.__key,a=t?e.getTextContent().length:0;return r.set(n,a,"text"),void(i&&o.set(n,a,"text"))}{const n=a.getParentOrThrow();let s,l;return Wv(e)?(l=e.__key,s=t?e.getChildrenSize():0):(s=a.getIndexWithinParent(),l=n.__key,t||s++),r.set(l,s,"element"),void(i&&o.set(l,s,"element"))}}const s=Pv(),l=ay(s._window);if(!l)return;const c=s._blockCursorElement,u=s._rootElement;if(null===u||null===c||!Wv(a)||a.isInline()||a.canBeEmpty()||iy(c,s,u),f=e,d=t?"backward":"forward",p=n,l.modify(f,d,p),l.rangeCount>0){const e=l.getRangeAt(0),n=this.anchor.getNode(),r=qv(n)?n:function(e){let t=e.getParentOrThrow();for(;null!==t;){if(ty(t))return t;t=t.getParentOrThrow()}return t}(n);if(this.applyDOMRange(e),this.dirty=!0,!i){const n=this.getNodes(),o=[];let i=!1;for(let e=0;e<n.length;e++){const t=n[e];Qm(t,r)?o.push(t):i=!0}if(i&&o.length>0)if(t){const e=o[0];Wv(e)?e.selectStart():e.getParentOrThrow().selectStart()}else{const e=o[o.length-1];Wv(e)?e.selectEnd():e.getParentOrThrow().selectEnd()}l.anchorNode===e.startContainer&&l.anchorOffset===e.startOffset||function(e){const t=e.focus,n=e.anchor,r=n.key,o=n.offset,i=n.type;Xg(n,t.key,t.offset,t.type),Xg(t,r,o,i),e._cachedNodes=null}(this)}}var f,d,p}forwardDeletion(e,t,n){if(!n&&("element"===e.type&&Wv(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){const e=t.getParent(),n=t.getNextSibling()||(null===e?null:e.getNextSibling());if(Wv(n)&&n.isShadowRoot())return!0}return!1}deleteCharacter(e){const t=this.isCollapsed();if(this.isCollapsed()){const t=this.anchor;let n=t.getNode();if(this.forwardDeletion(t,n,e))return;const r=this.focus,o=Hm(r,e);if(Uv(o)&&!o.isIsolated()){if(o.isKeyboardSelectable()&&Wv(n)&&0===n.getChildrenSize()){n.remove();const e=lv();e.add(o.__key),Pm(e)}else o.remove(),Pv().dispatchCommand(jp,void 0);return}if(!e&&Wv(o)&&Wv(n)&&n.isEmpty())return n.remove(),void o.selectStart();if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&("element"===t.type?t.getNode():t.getNode().getParentOrThrow()).collapseAtStart(this))return}else{const o="text"===r.type?r.getNode():null;if(n="text"===t.type?t.getNode():null,null!==o&&o.isSegmented()){const t=r.offset,i=o.getTextContentSize();if(o.is(n)||e&&t!==i||!e&&0!==t)return void nv(o,e,t)}else if(null!==n&&n.isSegmented()){const r=t.offset,i=n.getTextContentSize();if(n.is(o)||e&&0!==r||!e&&r!==i)return void nv(n,e,r)}!function(e,t){const n=e.anchor,r=e.focus,o=n.getNode();if(o===r.getNode()&&"text"===n.type&&"text"===r.type){const e=n.offset,i=r.offset,a=e<i,s=a?e:i,l=a?i:e,c=l-1;s!==c&&(Am(o.getTextContent().slice(s,l))||(t?r.offset=c:n.offset=c))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){const e=this.anchor.getNode();e.isEmpty()&&qv(e.getParent())&&0===e.getIndexWithinParent()&&e.collapseAtStart(this)}}deleteLine(e){if(this.isCollapsed()){const t="element"===this.anchor.type;if(t&&this.insertText(" "),this.modify("extend",e,"lineboundary"),0===(e?this.focus:this.anchor).offset&&this.modify("extend",e,"character"),t){const t=e?this.anchor:this.focus;t.set(t.key,t.offset+1,t.type)}}this.removeText()}deleteWord(e){if(this.isCollapsed()){const t=this.anchor,n=t.getNode();if(this.forwardDeletion(t,n,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Qg(e){return e instanceof Gg}function ev(e){const t=e.offset;if("text"===e.type)return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function tv(e){const t=e.getStartEndPoints();if(null===t)return[0,0];const[n,r]=t;return"element"===n.type&&"element"===r.type&&n.key===r.key&&n.offset===r.offset?[0,0]:[ev(n),ev(r)]}function nv(e,t,n){const r=e,o=r.getTextContent().split(/(?=\s)/g),i=o.length;let a=0,s=0;for(let e=0;e<i;e++){const r=e===i-1;if(s=a,a+=o[e].length,t&&a===n||a>n||r){o.splice(e,1),r&&(s=void 0);break}}const l=o.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(s,s))}function rv(e,t,n,r){let o,i=t;if(1===e.nodeType){let a=!1;const s=e.childNodes,l=s.length,c=r._blockCursorElement;i===l&&(a=!0,i=l-1);let u=s[i],f=!1;if(u===c)u=s[i+1],f=!0;else if(null!==c){const n=c.parentNode;e===n&&t>Array.prototype.indexOf.call(n.children,c)&&i--}if(o=Cm(u),Wg(o))i=Tm(o,a);else{let r=Cm(e);if(null===r)return null;if(Wv(r)){i=Math.min(r.getChildrenSize(),i);let e=r.getChildAtIndex(i);if(Wv(e)&&function(e,t,n){const r=e.getParent();return null===n||null===r||!r.canBeEmpty()||r!==n.getNode()}(e,0,n)){const t=a?e.getLastDescendant():e.getFirstDescendant();null===t?r=e:(e=t,r=Wv(e)?e:e.getParentOrThrow()),i=0}Wg(e)?(o=e,r=null,i=Tm(e,a)):e!==r&&a&&!f&&i++}else{const n=r.getIndexWithinParent();i=0===t&&Uv(r)&&Cm(e)===r?n:n+1,r=r.getParentOrThrow()}if(Wv(r))return qg(r.__key,i,"element")}}else o=Cm(e);return Wg(o)?qg(o.__key,i,"text"):null}function ov(e,t,n){const r=e.offset,o=e.getNode();if(0===r){const r=o.getPreviousSibling(),i=o.getParent();if(t){if((n||!t)&&null===r&&Wv(i)&&i.isInline()){const t=i.getPreviousSibling();Wg(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)}}else Wv(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Wg(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)}else if(r===o.getTextContent().length){const r=o.getNextSibling(),i=o.getParent();if(t&&Wv(r)&&r.isInline())e.key=r.__key,e.offset=0,e.type="element";else if((n||t)&&null===r&&Wv(i)&&i.isInline()&&!i.canInsertTextAfter()){const t=i.getNextSibling();Wg(t)&&(e.key=t.__key,e.offset=0)}}}function iv(e,t,n){if("text"===e.type&&"text"===t.type){const r=e.isBefore(t),o=e.is(t);ov(e,r,o),ov(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type);const i=Pv();if(i.isComposing()&&i._compositionKey!==e.key&&Zg(n)){const r=n.anchor,o=n.focus;Xg(e,r.key,r.offset,r.type),Xg(t,o.key,o.offset,o.type)}}}function av(e,t,n,r,o,i){if(null===e||null===n||!cm(o,e,n))return null;const a=rv(e,t,Zg(i)?i.anchor:null,o);if(null===a)return null;const s=rv(n,r,Zg(i)?i.focus:null,o);if(null===s)return null;if("element"===a.type&&"element"===s.type){const t=Cm(e),r=Cm(n);if(Uv(t)&&Uv(r))return null}return iv(a,s,i),[a,s]}function sv(e,t,n,r,o,i){const a=Ev(),s=new Jg(qg(e,t,o),qg(n,r,i),0,"");return s.dirty=!0,a._selection=s,s}function lv(){return new Gg(new Set)}function cv(e,t,n,r){const o=n._window;if(null===o)return null;const i=r||o.event,a=i?i.type:void 0,s="selectionchange"===a,l=!Hh&&(s||"beforeinput"===a||"compositionstart"===a||"compositionend"===a||"click"===a&&i&&3===i.detail||"drop"===a||void 0===a);let c,u,f,d;if(Zg(e)&&!l)return e.clone();if(null===t)return null;if(c=t.anchorNode,u=t.focusNode,f=t.anchorOffset,d=t.focusOffset,s&&Zg(e)&&!cm(n,c,u))return e.clone();const p=av(c,f,u,d,n,e);if(null===p)return null;const[h,m]=p;return new Jg(h,m,Zg(e)?e.format:0,Zg(e)?e.style:"")}function uv(){return Ev()._selection}function fv(){return Pv()._editorState._selection}function dv(e,t,n,r=1){const o=e.anchor,i=e.focus,a=o.getNode(),s=i.getNode();if(!t.is(a)&&!t.is(s))return;const l=t.__key;if(e.isCollapsed()){const t=o.offset;if(n<=t&&r>0||n<t&&r<0){const n=Math.max(0,t+r);o.set(l,n,"element"),i.set(l,n,"element"),pv(e)}}else{const a=e.isBackward(),s=a?i:o,c=s.getNode(),u=a?o:i,f=u.getNode();if(t.is(c)){const e=s.offset;(n<=e&&r>0||n<e&&r<0)&&s.set(l,Math.max(0,e+r),"element")}if(t.is(f)){const e=u.offset;(n<=e&&r>0||n<e&&r<0)&&u.set(l,Math.max(0,e+r),"element")}}pv(e)}function pv(e){const t=e.anchor,n=t.offset,r=e.focus,o=r.offset,i=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!Wv(i))return;const e=i.getChildrenSize(),o=n>=e,a=o?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Wg(a)){let e=0;o&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}}else{if(Wv(i)){const e=i.getChildrenSize(),r=n>=e,o=r?i.getChildAtIndex(e-1):i.getChildAtIndex(n);if(Wg(o)){let e=0;r&&(e=o.getTextContentSize()),t.set(o.__key,e,"text")}}if(Wv(a)){const e=a.getChildrenSize(),t=o>=e,n=t?a.getChildAtIndex(e-1):a.getChildAtIndex(o);if(Wg(n)){let e=0;t&&(e=n.getTextContentSize()),r.set(n.__key,e,"text")}}}}function hv(e,t,n,r,o){let i=null,a=0,s=null;null!==r?(i=r.__key,Wg(r)?(a=r.getTextContentSize(),s="text"):Wv(r)&&(a=r.getChildrenSize(),s="element")):null!==o&&(i=o.__key,Wg(o)?s="text":Wv(o)&&(s="element")),null!==i&&null!==s?e.set(i,a,s):(a=t.getIndexWithinParent(),-1===a&&(a=n.getChildrenSize()),e.set(n.__key,a,"element"))}function mv(e,t,n,r,o){"text"===e.type?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&(e.offset-=1)}function yv(e){let t=e;e.isCollapsed()||t.removeText();const n=uv();Zg(n)&&(t=n),Zg(t)||Kh(161);const r=t.anchor;let o=r.getNode(),i=r.offset;for(;!uy(o);)[o,i]=gv(o,i);return i}function gv(e,t){const n=e.getParent();if(!n){const e=Qv();return jm().append(e),e.select(),[jm(),0]}if(Wg(e)){const r=e.splitText(t);if(0===r.length)return[n,e.getIndexWithinParent()];const o=0===t?0:1;return[n,r[0].getIndexWithinParent()+o]}if(!Wv(e)||0===t)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const n=new Jg(qg(e.__key,t,"element"),qg(e.__key,t,"element"),0,""),o=e.insertNewAfter(n);o&&o.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}let vv=null,bv=null,xv=!1,wv=!1,_v=0;const Sv={characterData:!0,childList:!0,subtree:!0};function Ov(){return xv||null!==vv&&vv._readOnly}function kv(){xv&&Kh(13)}function jv(){_v>99&&Kh(14)}function Ev(){return null===vv&&Kh(195,Cv()),vv}function Pv(){return null===bv&&Kh(196,Cv()),bv}function Cv(){let e=0;const t=new Set,n=nb.version;if(typeof window<"u")for(const r of document.querySelectorAll("[contenteditable]")){const o=dm(r);if(um(o))e++;else if(o){let e=String(o.constructor.version||"<0.17.1");e===n&&(e+=" (separately built, likely a bundler configuration issue)"),t.add(e)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function Tv(e,t,n){const r=t.__type,o=function(e,t){const n=e._nodes.get(t);return void 0===n&&Kh(30,t),n}(e,r);let i=n.get(r);void 0===i&&(i=Array.from(o.transforms),n.set(r,i));const a=i.length;for(let e=0;e<a&&(i[e](t),t.isAttached());e++);}function Av(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function Mv(e,t){const n=e.type,r=t.get(n);void 0===r&&Kh(17,n);const o=r.klass;e.type!==o.getType()&&Kh(18,o.name);const i=o.importJSON(e),a=e.children;if(Wv(i)&&Array.isArray(a))for(let e=0;e<a.length;e++){const n=Mv(a[e],t);i.append(n)}return i}function Nv(e,t,n){const r=vv,o=xv,i=bv;vv=t,xv=!0,bv=e;try{return n()}finally{vv=r,xv=o,bv=i}}function Dv(e,t){const n=e._pendingEditorState,r=e._rootElement,o=e._headless||null===r;if(null===n)return;const i=e._editorState,a=i._selection,s=n._selection,l=0!==e._dirtyType,c=vv,u=xv,f=bv,d=e._updating,p=e._observer;let h=null;if(e._pendingEditorState=null,e._editorState=n,!o&&l&&null!==p){bv=e,vv=n,xv=!1,e._updating=!0;try{const t=e._dirtyType,r=e._dirtyElements,o=e._dirtyLeaves;p.disconnect(),h=function(e,t,n,r,o,i){jy="",Ty="",Ey="",Ay=2===r,Ny=null,gy=n,yy=n._config,vy=n._nodes,by=gy._listeners.mutation,xy=o,wy=i,_y=e._nodeMap,Sy=t._nodeMap,My=t._readOnly,Oy=new Map(n._keyToDOMMap);const a=new Map;return ky=a,qy("root",null),gy=void 0,vy=void 0,xy=void 0,wy=void 0,_y=void 0,Sy=void 0,yy=void 0,Oy=void 0,ky=void 0,a}(i,n,e,t,r,o)}catch(t){if(t instanceof Error&&e._onError(t),wv)throw t;return tb(e,null,r,n),tm(e),e._dirtyType=2,wv=!0,Dv(e,i),void(wv=!1)}finally{p.observe(r,Sv),e._updating=d,vv=c,xv=u,bv=f}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,y=e._dirtyElements,g=e._normalizedNodes,v=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){const n=e._decorators;let r=e._pendingDecorators||n;const o=t._nodeMap;let i;for(i in r)o.has(i)||(r===n&&(r=Om(e)),delete r[i])}(e,n);const x=o?null:ay(e._window);if(e._editable&&null!==x&&(l||null===s||s.dirty)){bv=e,vv=n;try{if(null!==p&&p.disconnect(),l||null===s||s.dirty){const t=e._blockCursorElement;null!==t&&iy(t,e,r),function(e,t,n,r,o,i){const a=r.anchorNode,s=r.focusNode,l=r.anchorOffset,c=r.focusOffset,u=document.activeElement;if(o.has("collaboration")&&u!==i||null!==u&&lm(u))return;if(!Zg(t))return void(null!==e&&cm(n,a,s)&&r.removeAllRanges());const f=t.anchor,d=t.focus,p=f.key,h=d.key,m=Zm(n,p),y=Zm(n,h),g=f.offset,v=d.offset,b=t.format,x=t.style,w=t.isCollapsed();let _=m,S=y,O=!1;if("text"===f.type){_=mm(m);const e=f.getNode();O=e.getFormat()!==b||e.getStyle()!==x}else Zg(e)&&"text"===e.anchor.type&&(O=!0);var k,j,E,P,C;if("text"===d.type&&(S=mm(y)),null!==_&&null!==S&&(w&&(null===e||O||Zg(e)&&(e.format!==b||e.style!==x))&&(k=b,j=x,E=g,P=p,C=performance.now(),sg=[k,j,E,P,C]),l!==g||c!==v||a!==_||s!==S||"Range"===r.type&&w||(null!==u&&i.contains(u)||i.focus({preventScroll:!0}),"element"===f.type))){try{r.setBaseAndExtent(_,g,S,v)}catch{}if(!o.has("skip-scroll-into-view")&&t.isCollapsed()&&null!==i&&i===document.activeElement){const e=t instanceof Jg&&"element"===t.anchor.type?_.childNodes[g]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){const n=document.createRange();n.selectNode(e),t=n.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,n){const r=n.ownerDocument,o=r.defaultView;if(null===o)return;let{top:i,bottom:a}=t,s=0,l=0,c=n;for(;null!==c;){const t=c===r.body;if(t)s=0,l=ey(e).innerHeight;else{const e=c.getBoundingClientRect();s=e.top,l=e.bottom}let n=0;if(i<s?n=-(s-i):a>l&&(n=a-l),0!==n)if(t)o.scrollBy(0,n);else{const e=c.scrollTop;c.scrollTop+=n;const t=c.scrollTop-e;i-=t,a-=t}if(t)break;c=Jm(c)}}(n,t,i)}}rg=!0}}(a,s,e,x,v,r)}(function(e,t,n){let r=e._blockCursorElement;if(Zg(n)&&n.isCollapsed()&&"element"===n.anchor.type&&t.contains(document.activeElement)){const o=n.anchor,i=o.getNode(),a=o.offset;let s=!1,l=null;if(a===i.getChildrenSize())oy(i.getChildAtIndex(a-1))&&(s=!0);else{const t=i.getChildAtIndex(a);if(oy(t)){const n=t.getPreviousSibling();(null===n||oy(n))&&(s=!0,l=e.getElementByKey(t.__key))}}if(s){const n=e.getElementByKey(i.__key);return null===r&&(e._blockCursorElement=r=function(e){const t=e.theme,n=document.createElement("div");n.contentEditable="false",n.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;if(void 0!==r){if("string"==typeof r){const e=qh(r);r=t.blockCursor=e}void 0!==r&&n.classList.add(...r)}return n}(e._config)),t.style.caretColor="transparent",void(null===l?n.appendChild(r):n.insertBefore(r,l))}}null!==r&&iy(r,e,t)})(e,r,s),null!==p&&p.observe(r,Sv)}finally{bv=f,vv=c}}null!==h&&function(e,t,n,r,o){const i=Array.from(e._listeners.mutation),a=i.length;for(let e=0;e<a;e++){const[a,s]=i[e],l=t.get(s);void 0!==l&&a(l,{dirtyLeaves:r,prevEditorState:o,updateTags:n})}}(e,h,v,m,i),Zg(s)||null===s||null!==a&&a.is(s)||e.dispatchCommand(jp,void 0);const w=e._pendingDecorators;null!==w&&(e._decorators=w,e._pendingDecorators=null,Iv("decorator",e,!0,w)),function(e,t,n){const r=km(t),o=km(n);r!==o&&Iv("textcontent",e,!0,o)}(e,t||i,n),Iv("update",e,!0,{dirtyElements:y,dirtyLeaves:m,editorState:n,normalizedNodes:g,prevEditorState:t||i,tags:v}),function(e,t){if(e._deferred=[],0!==t.length){const n=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=n}}}(e,b),function(e){const t=e._updates;if(0!==t.length){const n=t.shift();if(n){const[t,r]=n;zv(e,t,r)}}}(e)}function Iv(e,t,n,...r){const o=t._updating;t._updating=n;try{const n=Array.from(t._listeners[e]);for(let e=0;e<n.length;e++)n[e].apply(null,r)}finally{t._updating=o}}function Rv(e,t,n){if(!1===e._updating||bv!==e){let r=!1;return e.update((()=>{r=Rv(e,t,n)})),r}const r=Mm(e);for(let o=4;o>=0;o--)for(let i=0;i<r.length;i++){const a=r[i]._commands.get(t);if(void 0!==a){const t=a[o];if(void 0!==t){const r=Array.from(t),o=r.length;for(let t=0;t<o;t++)if(!0===r[t](n,e))return!0}}}return!1}function Lv(e,t){const n=e._updates;let r=t||!1;for(;0!==n.length;){const t=n.shift();if(t){const[n,o]=t;let i,a;if(void 0!==o){if(i=o.onUpdate,a=o.tag,o.skipTransforms&&(r=!0),o.discrete){const t=e._pendingEditorState;null===t&&Kh(191),t._flushSync=!0}i&&e._deferred.push(i),a&&e._updateTags.add(a)}n()}}return r}function zv(e,t,n){const r=e._updateTags;let o,i,a=!1,s=!1;void 0!==n&&(o=n.onUpdate,i=n.tag,null!=i&&r.add(i),a=n.skipTransforms||!1,s=n.discrete||!1),o&&e._deferred.push(o);const l=e._editorState;let c=e._pendingEditorState,u=!1;(null===c||c._readOnly)&&(c=e._pendingEditorState=new Xv(new Map((c||l)._nodeMap)),u=!0),c._flushSync=s;const f=vv,d=xv,p=bv,h=e._updating;vv=c,xv=!1,e._updating=!0,bv=e;try{u&&(e._headless?null!==l._selection&&(c._selection=l._selection.clone()):c._selection=function(e){const t=e.getEditorState()._selection,n=ay(e._window);return Zg(t)||null==t?cv(t,n,e,null):t.clone()}(e));const n=e._compositionKey;t(),a=Lv(e,a),function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(Zg(r)){const e=r.anchor,t=r.focus;let o;if("text"===e.type&&(o=e.getNode(),o.selectionTransform(n,r)),"text"===t.type){const e=t.getNode();o!==e&&e.selectionTransform(n,r)}}}(c,e),0!==e._dirtyType&&(a?function(e,t){const n=t._dirtyLeaves,r=e._nodeMap;for(const e of n){const t=r.get(e);Wg(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&om(t)}}(c,e):function(e,t){const n=t._dirtyLeaves,r=t._dirtyElements,o=e._nodeMap,i=xm(),a=new Map;let s=n,l=s.size,c=r,u=c.size;for(;l>0||u>0;){if(l>0){t._dirtyLeaves=new Set;for(const e of s){const r=o.get(e);Wg(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&om(r),void 0!==r&&Av(r,i)&&Tv(t,r,a),n.add(e)}if(s=t._dirtyLeaves,l=s.size,l>0){_v++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(const e of c){const n=e[0],s=e[1];if("root"!==n&&!s)continue;const l=o.get(n);void 0!==l&&Av(l,i)&&Tv(t,l,a),r.set(n,s)}s=t._dirtyLeaves,l=s.size,c=t._dirtyElements,u=c.size,_v++}t._dirtyLeaves=n,t._dirtyElements=r}(c,e),Lv(e),function(e,t,n,r){const o=e._nodeMap,i=t._nodeMap,a=[];for(const[e]of r){const t=i.get(e);void 0!==t&&(t.isAttached()||(Wv(t)&&my(t,e,o,i,a,r),o.has(e)||r.delete(e),a.push(e)))}for(const e of a)i.delete(e);for(const e of n){const t=i.get(e);void 0===t||t.isAttached()||(o.has(e)||n.delete(e),i.delete(e))}}(l,c,e._dirtyLeaves,e._dirtyElements)),n!==e._compositionKey&&(c._flushSync=!0);const r=c._selection;if(Zg(r)){const e=c._nodeMap,t=r.anchor.key,n=r.focus.key;void 0!==e.get(t)&&void 0!==e.get(n)||Kh(19)}else Qg(r)&&0===r._nodes.size&&(c._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=l,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void Dv(e)}finally{vv=f,xv=d,bv=p,e._updating=h,_v=0}0!==e._dirtyType||function(e,t){const n=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(n))return!0}else if(null!==n)return!0;return!1}(c,e)?c._flushSync?(c._flushSync=!1,Dv(e)):u&&sm((()=>{Dv(e)})):(c._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function Bv(e,t,n){e._updating?e._updates.push([t,n]):zv(e,t,n)}class Fv extends bg{constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null}afterCloneFrom(e){super.afterCloneFrom(e),this.__first=e.__first,this.__last=e.__last,this.__size=e.__size,this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir}getFormat(){return this.getLatest().__format}getFormatType(){const e=this.getFormat();return Vh[e]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){const e=[];let t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){const e=Pv()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){const e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){const e=[];let t=this.getFirstChild();for(;null!==t;){if(Wg(t)&&e.push(t),Wv(t)){const n=t.getAllTextNodes();e.push(...n)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;Wv(e);){const t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;Wv(e);){const t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){const t=this.getChildren(),n=t.length;if(e>=n){const e=t[n-1];return Wv(e)&&e.getLastDescendant()||e||null}const r=t[e];return Wv(r)&&r.getFirstDescendant()||r||null}getFirstChild(){const e=this.getLatest().__first;return null===e?null:wm(e)}getFirstChildOrThrow(){const e=this.getFirstChild();return null===e&&Kh(45,this.__key),e}getLastChild(){const e=this.getLatest().__last;return null===e?null:wm(e)}getLastChildOrThrow(){const e=this.getLastChild();return null===e&&Kh(96,this.__key),e}getChildAtIndex(e){const t=this.getChildrenSize();let n,r;if(e<t/2){for(n=this.getFirstChild(),r=0;null!==n&&r<=e;){if(r===e)return n;n=n.getNextSibling(),r++}return null}for(n=this.getLastChild(),r=t-1;null!==n&&r>=e;){if(r===e)return n;n=n.getPreviousSibling(),r--}return null}getTextContent(){let e="";const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContent(),Wv(o)&&r!==n-1&&!o.isInline()&&(e+=Nh)}return e}getTextContentSize(){let e=0;const t=this.getChildren(),n=t.length;for(let r=0;r<n;r++){const o=t[r];e+=o.getTextContentSize(),Wv(o)&&r!==n-1&&!o.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}hasFormat(e){if(""!==e){const t=Wh[e];return!!(this.getFormat()&t)}return!1}select(e,t){kv();const n=uv();let r=e,o=t;const i=this.getChildrenSize();if(!this.canBeEmpty())if(0===e&&0===t){const e=this.getFirstChild();if(Wg(e)||Wv(e))return e.select(0,0)}else if(!(void 0!==e&&e!==i||void 0!==t&&t!==i)){const e=this.getLastChild();if(Wg(e)||Wv(e))return e.select()}void 0===r&&(r=i),void 0===o&&(o=i);const a=this.__key;return Zg(n)?(n.anchor.set(a,r,"element"),n.focus.set(a,o,"element"),n.dirty=!0,n):sv(a,r,a,o,"element","element")}selectStart(){const e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){const e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){const e=this.getWritable();return this.getChildren().forEach((e=>e.remove())),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){const t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?Wh[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,n){const r=n.length,o=this.getChildrenSize(),i=this.getWritable(),a=i.__key,s=[],l=[],c=this.getChildAtIndex(e+t);let u=null,f=o-t+r;if(0!==e)if(e===o)u=this.getLastChild();else{const t=this.getChildAtIndex(e);null!==t&&(u=t.getPreviousSibling())}if(t>0){let e=null===u?this.getFirstChild():u.getNextSibling();for(let n=0;n<t;n++){null===e&&Kh(100);const t=e.getNextSibling(),n=e.__key;gm(e.getWritable()),l.push(n),e=t}}let d=u;for(let e=0;e<r;e++){const t=n[e];null!==d&&t.is(d)&&(u=d=d.getPreviousSibling());const r=t.getWritable();r.__parent===a&&f--,gm(r);const o=t.__key;if(null===d)i.__first=o,r.__prev=null;else{const e=d.getWritable();e.__next=o,r.__prev=e.__key}t.__key===a&&Kh(76),r.__parent=a,s.push(o),d=t}if(e+t===o)null!==d&&(d.getWritable().__next=null,i.__last=d.__key);else if(null!==c){const e=c.getWritable();if(null!==d){const t=d.getWritable();e.__prev=d.__key,t.__next=c.__key}else e.__prev=null}if(i.__size=f,l.length){const e=uv();if(Zg(e)){const t=new Set(l),n=new Set(s),{anchor:r,focus:o}=e;Vv(r,t,n)&&hv(r,r.getNode(),this,u,c),Vv(o,t,n)&&hv(o,o.getNode(),this,u,c),0!==f||this.canBeEmpty()||ty(this)||this.remove()}}return i}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,n){return!1}canMergeWhenEmpty(){return!1}}function Wv(e){return e instanceof Fv}function Vv(e,t,n){let r=e.getNode();for(;r;){const e=r.__key;if(t.has(e)&&!n.has(e))return!0;r=r.getParent()}return!1}class $v extends bg{constructor(e){super(e)}decorate(e,t){Kh(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Uv(e){return e instanceof $v}class Kv extends Fv{static getType(){return"root"}static clone(){return new Kv}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){Kh(51)}getTextContent(){const e=this.__cachedText;return!Ov()&&0!==Pv()._dirtyType||null===e?super.getTextContent():e}remove(){Kh(52)}replace(e){Kh(53)}insertBefore(e){Kh(54)}insertAfter(e){Kh(55)}updateDOM(e,t){return!1}append(...e){for(let t=0;t<e.length;t++){const n=e[t];Wv(n)||Uv(n)||Kh(56)}return super.append(...e)}static importJSON(e){const t=jm();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function qv(e){return e instanceof Kv}function Hv(){return new Xv(new Map([["root",new Kv]]))}function Yv(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&Kh(130,n.name),Wv(e)){const r=t.children;Array.isArray(r)||Kh(59,n.name);const o=e.getChildren();for(let e=0;e<o.length;e++){const t=Yv(o[e]);r.push(t)}}return t}class Xv{constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return Nv(t&&t.editor||null,this,e)}clone(e){const t=new Xv(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return Nv(null,this,(()=>({root:Yv(jm())})))}}class Gv extends Fv{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class Zv extends Fv{constructor(e){super(e),this.__textFormat=0,this.__textStyle=""}static getType(){return"paragraph"}getTextFormat(){return this.getLatest().__textFormat}setTextFormat(e){const t=this.getWritable();return t.__textFormat=e,t}hasTextFormat(e){const t=Bh[e];return!!(this.getTextFormat()&t)}getTextStyle(){return this.getLatest().__textStyle}setTextStyle(e){const t=this.getWritable();return t.__textStyle=e,t}static clone(e){return new Zv(e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}createDOM(e){const t=document.createElement("p"),n=Um(e.theme,"paragraph");return void 0!==n&&t.classList.add(...n),t}updateDOM(e,t,n){return!1}static importDOM(){return{p:e=>({conversion:Jv,priority:0})}}exportDOM(e){const{element:t}=super.exportDOM(e);if(t&&sy(t)){this.isEmpty()&&t.append(document.createElement("br"));const e=this.getFormatType();t.style.textAlign=e;const n=this.getDirection();n&&(t.dir=n);const r=this.getIndent();r>0&&(t.style.textIndent=20*r+"px")}return{element:t}}static importJSON(e){const t=Qv();return t.setFormat(e.format),t.setIndent(e.indent),t.setDirection(e.direction),t.setTextFormat(e.textFormat),t}exportJSON(){return{...super.exportJSON(),textFormat:this.getTextFormat(),textStyle:this.getTextStyle(),type:"paragraph",version:1}}insertNewAfter(e,t){const n=Qv();n.setTextFormat(e.format),n.setTextStyle(e.style);const r=this.getDirection();return n.setDirection(r),n.setFormat(this.getFormatType()),n.setStyle(this.getTextStyle()),this.insertAfter(n,t),n}collapseAtStart(){const e=this.getChildren();if(0===e.length||Wg(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function Jv(e){const t=Qv();if(e.style){t.setFormat(e.style.textAlign);const n=parseInt(e.style.textIndent,10)/20;n>0&&t.setIndent(n)}return{node:t}}function Qv(){return ny(new Zv)}function eb(e){return e instanceof Zv}function tb(e,t,n,r){const o=e._keyToDOMMap;o.clear(),e._editorState=Hv(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const i=e._observer;null!==i&&(i.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==n&&(n.textContent="",o.set("root",n))}class nb{constructor(e,t,n,r,o,i,a){this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=n,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Nm(),this._onError=o,this._htmlConversions=i,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){const t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){const t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){const t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){const t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){const t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,n){void 0===n&&Kh(35);const r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);const o=r.get(e);void 0===o&&Kh(36,String(e));const i=o[n];return i.add(t),()=>{i.delete(t),o.every((e=>0===e.size))&&r.delete(e)}}registerMutationListener(e,t,n){const r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,o=this._listeners.mutation;o.set(t,r);const i=n&&n.skipInitialization;return void 0===i||i||this.initializeMutationListener(t,r),()=>{o.delete(t)}}getRegisteredNode(e){const t=this._nodes.get(e.getType());return void 0===t&&Kh(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){const n=this._editorState,r=function(e){if(!e._readOnly&&e.isEmpty())return py;e._readOnly||Kh(192);let t=dy.get(e);if(!t){t=new Map,dy.set(e,t);for(const[n,r]of e._nodeMap){const e=r.__type;let o=t.get(e);o||(o=new Map,t.set(e,o)),o.set(n,r)}}return t}(n).get(t.getType());if(!r)return;const o=new Map;for(const e of r.keys())o.set(e,"created");o.size>0&&e(o,{dirtyLeaves:new Set,prevEditorState:n,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){const n=this.getRegisteredNode(e);return n.transforms.add(t),n}registerNodeTransform(e,t){const n=this.registerNodeTransformToKlass(e,t),r=[n],o=n.replaceWithKlass;if(null!=o){const e=this.registerNodeTransformToKlass(o,t);r.push(e)}var i;return i=e.getType(),Bv(this,(()=>{const e=Ev();if(e.isEmpty())return;if("root"===i)return void jm().markDirty();const t=e._nodeMap;for(const[,e]of t)e.markDirty()}),null===this._pendingEditorState?{tag:"history-merge"}:void 0),()=>{r.forEach((e=>e.transforms.delete(t)))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return Xm(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){const t=this._rootElement;if(e!==t){const n=Um(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,tb(this,t,e,r),null!==t&&(this._config.disableEvents||function(e){const t=e.ownerDocument,n=ng.get(t);void 0===n&&Kh(162);const r=n-1;r>=0||Kh(164),ng.set(t,r),0===r&&t.removeEventListener("selectionchange",mg);const o=dm(e);um(o)?(function(e){if(null!==e._parentEditor){const t=Mm(e),n=t[t.length-1]._key;hg.get(n)===e&&hg.delete(n)}else hg.delete(e._key)}(o),e.__lexicalEditor=null):o&&Kh(198);const i=pg(e);for(let e=0;e<i.length;e++)i[e]();e.__lexicalEventHandles=[]}(t),null!=n&&t.classList.remove(...n)),null!==e){const t=function(e){const t=e.ownerDocument;return t&&t.defaultView||null}(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,tm(this),this._updateTags.add("history-merge"),Dv(this),this._config.disableEvents||function(e,t){const n=e.ownerDocument,r=ng.get(n);(void 0===r||r<1)&&n.addEventListener("selectionchange",mg),ng.set(n,(r||0)+1),e.__lexicalEditor=t;const o=pg(e);for(let n=0;n<Zy.length;n++){const[r,i]=Zy[n],a="function"==typeof i?e=>{gg(e)||(yg(e),(t.isEditable()||"click"===r)&&i(e,t))}:e=>{if(gg(e))return;yg(e);const n=t.isEditable();switch(r){case"cut":return n&&Xm(t,rh,e);case"copy":return Xm(t,nh,e);case"paste":return n&&Xm(t,Mp,e);case"dragstart":return n&&Xm(t,Qp,e);case"dragover":return n&&Xm(t,eh,e);case"dragend":return n&&Xm(t,th,e);case"focus":return n&&Xm(t,ch,e);case"blur":return n&&Xm(t,uh,e);case"drop":return n&&Xm(t,Jp,e)}};e.addEventListener(r,a),o.push((()=>{e.removeEventListener(r,a)}))}}(e,this),null!=n&&e.classList.add(...n)}else this._editorState=r,this._pendingEditorState=null,this._window=null;Iv("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&Kh(38),em(this);const n=this._pendingEditorState,r=this._updateTags,o=void 0!==t?t.tag:null;null===n||n.isEmpty()||(null!=o&&r.add(o),Dv(this)),this._pendingEditorState=e,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=o&&r.add(o),Dv(this)}parseEditorState(e,t){return function(e,t,n){const r=Hv(),o=vv,i=xv,a=bv,s=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,u=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,vv=r,xv=!1,bv=t;try{const o=t._nodes;Mv(e.root,o),n&&n(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=s,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=u,vv=o,xv=i,bv=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return Dv(this),this.getEditorState().read(e,{editor:this})}update(e,t){Bv(this,e,t)}focus(e,t={}){const n=this._rootElement;null!==n&&(n.setAttribute("autocapitalize","off"),Bv(this,(()=>{const e=uv(),n=jm();null!==e?e.dirty=!0:0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd())}),{onUpdate:()=>{n.removeAttribute("autocapitalize"),e&&e()},tag:"focus"}),null===this._pendingEditorState&&n.removeAttribute("autocapitalize"))}blur(){const e=this._rootElement;null!==e&&e.blur();const t=ay(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,Iv("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}nb.version="0.17.1+prod.esm";const rb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,ob=rb?f.useLayoutEffect:f.useEffect,ib={tag:"history-merge"};function ab({initialConfig:e,children:t}){const n=(0,f.useMemo)((()=>{const{theme:t,namespace:n,nodes:r,onError:o,editorState:i,html:a}=e,s=function(e,t){return{getTheme:function(){return t??null}}}(0,t),l=function(e){const t=e||{},n=bv,r=t.theme||{},o=void 0===e?n:t.parentEditor||null,i=t.disableEvents||!1,a=Hv(),s=t.namespace||(null!==o?o._config.namespace:Nm()),l=t.editorState,c=[Kv,Ag,xg,$g,Zv,Gv,...t.nodes||[]],{onError:u,html:f}=t,d=void 0===t.editable||t.editable;let p;if(void 0===e&&null!==n)p=n._nodes;else{p=new Map;for(let e=0;e<c.length;e++){let t=c[e],n=null,r=null;if("function"!=typeof t){const e=t;t=e.replace,n=e.with,r=e.withKlass||null}const o=t.getType(),i=t.transform(),a=new Set;null!==i&&a.add(i),p.set(o,{exportDOM:f&&f.export?f.export.get(t):void 0,klass:t,replace:n,replaceWithKlass:r,transforms:a})}}const h=new nb(a,o,p,{disableEvents:i,namespace:s,theme:r},u||console.error,function(e,t){const n=new Map,r=new Set,o=e=>{Object.keys(e).forEach((t=>{let r=n.get(t);void 0===r&&(r=[],n.set(t,r)),r.push(e[t])}))};return e.forEach((e=>{const t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);const n=t.call(e.klass);null!==n&&o(n)})),t&&o(t),n}(p,f?f.import:void 0),d);return void 0!==l&&(h._pendingEditorState=l,h._dirtyType=2),h}({editable:e.editable,html:a,namespace:n,nodes:r,onError:e=>o(e,l),theme:t});return function(e,t){if(null!==t)if(void 0===t)e.update((()=>{const t=jm();if(t.isEmpty()){const n=Qv();t.append(n);const r=rb?document.activeElement:null;(null!==uv()||null!==r&&r===e.getRootElement())&&n.select()}}),ib);else if(null!==t)switch(typeof t){case"string":{const n=e.parseEditorState(t);e.setEditorState(n,ib);break}case"object":e.setEditorState(t,ib);break;case"function":e.update((()=>{jm().isEmpty()&&t(e)}),ib)}}(l,i),[l,s]}),[]);return ob((()=>{const t=e.editable,[r]=n;r.setEditable(void 0===t||t)}),[]),(0,u.jsx)(Sp.Provider,{value:n,children:t})}const sb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?f.useLayoutEffect:f.useEffect;function lb(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function cb(e){return()=>function(e){if(!function(e,t=!0){if(e)return!1;let n=jm().getTextContent();return t&&(n=n.trim()),""===n}(e,!1))return!1;const t=jm().getChildren(),n=t.length;if(n>1)return!1;for(let e=0;e<n;e++){const n=t[e];if(Uv(n))return!1;if(Wv(n)){if(!eb(n)||0!==n.__indent)return!1;const t=n.getChildren(),r=t.length;for(let n=0;n<r;n++)if(!Wg(t[e]))return!1}}return!0}(e)}function ub(e,t){const n=Hm(e.focus,t);return Uv(n)&&!n.isIsolated()||Wv(n)&&!n.isInline()&&!n.canBeEmpty()}function fb(e,t,n){const r=function(e){const t=e.anchor.getNode();return"rtl"===(qv(t)?t:t.getParentOrThrow()).getDirection()}(e);!function(e,t,n){e.modify(t?"extend":"move",n,"character")}(e,t,n?!r:r)}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})),function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));const db=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,pb=db&&"documentMode"in document?document.documentMode:null;function hb(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}function mb(e,t,n,r=null){let o=null===r||t.isSelected(r);const i=Wv(t)&&t.excludeFromCopy("html");let a=t;if(null!==r){let e=hy(t);e=Wg(e)&&null!==r?function(e,t){const n=e.getStartEndPoints();if(t.isSelected(e)&&!t.isSegmented()&&!t.isToken()&&null!==n){const[r,o]=n,i=e.isBackward(),a=r.getNode(),s=o.getNode(),l=t.is(a),c=t.is(s);if(l||c){const[n,r]=tv(e),o=a.is(s),l=t.is(i?s:a),c=t.is(i?a:s);let u,f=0;return o?(f=n>r?r:n,u=n>r?n:r):l?(f=i?r:n,u=void 0):c&&(f=0,u=i?n:r),t.__text=t.__text.slice(f,u),t}}return t}(r,e):e,a=e}const s=Wv(a)?a.getChildren():[],l=e._nodes.get(a.getType());let c;c=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);const{element:u,after:f}=c;if(!u)return!1;const d=document.createDocumentFragment();for(let n=0;n<s.length;n++){const i=s[n],a=mb(e,i,d,r);!o&&Wv(t)&&a&&t.extractWithChild(i,r,"html")&&(o=!0)}if(o&&!i){if(sy(u)&&u.append(d),n.append(u),f){const e=f.call(a,u);e&&u.replaceWith(e)}}else n.append(d);return o}db&&"InputEvent"in window&&!pb&&new window.InputEvent("input");var yb=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}((function(e){const t=new URLSearchParams;t.append("code",e);for(let e=1;e<arguments.length;e++)t.append("v",arguments[e]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}));function gb(e,t){const n=e.getData("text/plain")||e.getData("text/uri-list");null!=n&&t.insertRawText(n)}const vb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement,bb=vb&&"documentMode"in document?document.documentMode:null,xb=!(!vb||!("InputEvent"in window)||bb)&&"getTargetRanges"in new window.InputEvent("input"),wb=vb&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),_b=vb&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Sb=vb&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Ob=vb&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Sb;function kb(e,t){t.update((()=>{if(null!==e){const n=function(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}(e,KeyboardEvent)?null:e.clipboardData,r=uv();if(null!==r&&null!=n){e.preventDefault();const o=function(e,t=uv()){return null==t&&yb(166),Zg(t)&&t.isCollapsed()||0===t.getNodes().length?"":function(e,t){if(typeof document>"u"||typeof window>"u"&&void 0===global.window)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=jm().getChildren();for(let o=0;o<r.length;o++)mb(e,r[o],n,t);return n.innerHTML}(e,t)}(t);null!==o&&n.setData("text/html",o),n.setData("text/plain",r.getTextContent())}}}))}const jb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?f.useLayoutEffect:f.useEffect;function Eb(e){return e.getEditorState().read(cb(e.isComposing()))}function Pb({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Op(),o=function(e,t){const[n,r]=(0,f.useState)((()=>e.getDecorators()));return jb((()=>e.registerDecoratorListener((e=>{(0,p.flushSync)((()=>{r(e)}))}))),[e]),(0,f.useEffect)((()=>{r(e.getDecorators())}),[e]),(0,f.useMemo)((()=>{const r=[],o=Object.keys(n);for(let i=0;i<o.length;i++){const a=o[i],s=(0,u.jsx)(t,{onError:t=>e._onError(t),children:(0,u.jsx)(f.Suspense,{fallback:null,children:n[a]})}),l=e.getElementByKey(a);null!==l&&r.push((0,p.createPortal)(s,l,a))}return r}),[t,n,e])}(r,n);return jb((()=>hb(function(e){return hb(e.registerCommand(Pp,(e=>{const t=uv();return!!Zg(t)&&(t.deleteCharacter(e),!0)}),0),e.registerCommand(Dp,(e=>{const t=uv();return!!Zg(t)&&(t.deleteWord(e),!0)}),0),e.registerCommand(Ip,(e=>{const t=uv();return!!Zg(t)&&(t.deleteLine(e),!0)}),0),e.registerCommand(Ap,(e=>{const t=uv();if(!Zg(t))return!1;if("string"==typeof e)t.insertText(e);else{const n=e.dataTransfer;if(null!=n)gb(n,t);else{const n=e.data;n&&t.insertText(n)}}return!0}),0),e.registerCommand(Np,(()=>{const e=uv();return!!Zg(e)&&(e.removeText(),!0)}),0),e.registerCommand(Cp,(e=>{const t=uv();return!!Zg(t)&&(t.insertLineBreak(e),!0)}),0),e.registerCommand(Tp,(()=>{const e=uv();return!!Zg(e)&&(e.insertLineBreak(),!0)}),0),e.registerCommand(Vp,(e=>{const t=uv();if(!Zg(t))return!1;const n=e,r=n.shiftKey;return!!ub(t,!0)&&(n.preventDefault(),fb(t,r,!0),!0)}),0),e.registerCommand(Fp,(e=>{const t=uv();if(!Zg(t))return!1;const n=e,r=n.shiftKey;return!!ub(t,!1)&&(n.preventDefault(),fb(t,r,!1),!0)}),0),e.registerCommand(Yp,(t=>!!Zg(uv())&&(t.preventDefault(),e.dispatchCommand(Pp,!0))),0),e.registerCommand(Gp,(t=>!!Zg(uv())&&(t.preventDefault(),e.dispatchCommand(Pp,!1))),0),e.registerCommand(qp,(t=>{if(!Zg(uv()))return!1;if(null!==t){if((_b||wb||Ob)&&xb)return!1;t.preventDefault()}return e.dispatchCommand(Cp,!1)}),0),e.registerCommand(oh,(()=>(function(){const e=jm();Pm(function(e){return im(e.anchor),im(e.focus),e}(e.select(0,e.getChildrenSize())))}(),!0)),0),e.registerCommand(nh,(t=>!!Zg(uv())&&(kb(t,e),!0)),0),e.registerCommand(rh,(t=>{return!!Zg(uv())&&(kb(t,n=e),n.update((()=>{const e=uv();Zg(e)&&e.removeText()})),!0);var n}),0),e.registerCommand(Mp,(t=>{return!!Zg(uv())&&(r=e,(n=t).preventDefault(),r.update((()=>{const e=uv(),{clipboardData:t}=n;null!=t&&Zg(e)&&gb(t,e)}),{tag:"paste"}),!0);var n,r}),0),e.registerCommand(Jp,(e=>!!Zg(uv())&&(e.preventDefault(),!0)),0),e.registerCommand(Qp,(e=>!!Zg(uv())&&(e.preventDefault(),!0)),0))}(i),function(e){const t=window.location.origin,n=n=>{if(n.origin!==t)return;const r=e.getRootElement();if(document.activeElement!==r)return;const o=n.data;if("string"==typeof o){let t;try{t=JSON.parse(o)}catch{return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){const r=t.payload;if(r&&"makeChanges"===r.functionId){const t=r.args;if(t){const[r,o,i,a,s,l]=t;e.update((()=>{const e=uv();if(Zg(e)){const t=e.anchor;let l=t.getNode(),c=0,u=0;if(Wg(l)&&r>=0&&o>=0&&(c=r,u=r+o,e.setTextNodeRange(l,c,l,u)),c===u&&""===i||(e.insertRawText(i),l=t.getNode()),Wg(l)){c=a,u=a+s;const t=l.getTextContentSize();c=c>t?t:c,u=u>t?t:u,e.setTextNodeRange(l,c,l,u)}n.stopImmediatePropagation()}}))}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}(i))),[i=r]),(0,u.jsxs)(u.Fragment,{children:[e,(0,u.jsx)(Cb,{content:t}),o]});var i}function Cb({content:e}){const[t]=Op(),n=function(e){const[t,n]=(0,f.useState)((()=>Eb(e)));return jb((()=>{function t(){const t=Eb(e);n(t)}return t(),hb(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),r=function(e){const[t]=Op(),n=(0,f.useMemo)((()=>e(t)),[t,e]),r=(0,f.useRef)(n.initialValueFn()),[o,i]=(0,f.useState)(r.current);return sb((()=>{const{initialValueFn:e,subscribe:t}=n,o=e();return r.current!==o&&(r.current=o,i(o)),t((e=>{r.current=e,i(e)}))}),[n,e]),o}(lb);return n?"function"==typeof e?e(r):e:null}const Tb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?f.useLayoutEffect:f.useEffect,Ab=(0,f.forwardRef)((function({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:o,ariaExpanded:i,ariaLabel:a,ariaLabelledBy:s,ariaMultiline:l,ariaOwns:c,ariaRequired:d,autoCapitalize:p,className:h,id:m,role:y="textbox",spellCheck:g=!0,style:v,tabIndex:b,"data-testid":x,...w},_){const[S,O]=(0,f.useState)(e.isEditable()),k=(0,f.useCallback)((t=>{t&&t.ownerDocument&&t.ownerDocument.defaultView?e.setRootElement(t):e.setRootElement(null)}),[e]),j=(0,f.useMemo)((()=>function(...e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}(_,k)),[k,_]);return Tb((()=>(O(e.isEditable()),e.registerEditableListener((e=>{O(e)})))),[e]),(0,u.jsx)("div",{...w,"aria-activedescendant":S?t:void 0,"aria-autocomplete":S?n:"none","aria-controls":S?r:void 0,"aria-describedby":o,"aria-expanded":S&&"combobox"===y?!!i:void 0,"aria-label":a,"aria-labelledby":s,"aria-multiline":l,"aria-owns":S?c:void 0,"aria-readonly":!S||void 0,"aria-required":d,autoCapitalize:p,className:h,contentEditable:S,"data-testid":x,id:m,ref:j,role:S?y:void 0,spellCheck:g,style:v,tabIndex:b})}));function Mb(e){return e.getEditorState().read(cb(e.isComposing()))}const Nb=(0,f.forwardRef)((function(e,t){const{placeholder:n,...r}=e,[o]=Op();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ab,{editor:o,...r,ref:t}),null!=n&&(0,u.jsx)(Db,{editor:o,content:n})]})}));function Db({content:e,editor:t}){const n=function(e){const[t,n]=(0,f.useState)((()=>Mb(e)));return Tb((()=>{function t(){const t=Mb(e);n(t)}return t(),hb(e.registerUpdateListener((()=>{t()})),e.registerEditableListener((()=>{t()})))}),[e]),t}(t),[r,o]=(0,f.useState)(t.isEditable());if((0,f.useLayoutEffect)((()=>(o(t.isEditable()),t.registerEditableListener((e=>{o(e)})))),[t]),!n)return null;let i=null;return"function"==typeof e?i=e(r):null!==e&&(i=e),null===i?null:(0,u.jsx)("div",{"aria-hidden":!0,children:i})}function Ib(e){e.undoStack=[],e.redoStack=[],e.current=null}function Rb({delay:e,externalHistoryState:t}){const[n]=Op();return function(e,t,n=1e3){const r=(0,f.useMemo)((()=>t||{current:null,redoStack:[],undoStack:[]}),[t]);(0,f.useEffect)((()=>function(e,t,n){const r=function(e,t){let n=Date.now(),r=0;return(o,i,a,s,l,c)=>{const u=Date.now();if(c.has("historic"))return r=0,n=u,2;const f=function(e,t,n,r,o){if(null===e||0===n.size&&0===r.size&&!o)return 0;const i=t._selection,a=e._selection;if(o)return 1;if(!(Zg(i)&&Zg(a)&&a.isCollapsed()&&i.isCollapsed()))return 0;const s=function(e,t,n){const r=e._nodeMap,o=[];for(const e of t){const t=r.get(e);void 0!==t&&o.push(t)}for(const[e,t]of n){if(!t)continue;const n=r.get(e);void 0===n||qv(n)||o.push(n)}return o}(t,n,r);if(0===s.length)return 0;if(s.length>1){const n=t._nodeMap,r=n.get(i.anchor.key),o=n.get(a.anchor.key);return r&&o&&!e._nodeMap.has(r.__key)&&Wg(r)&&1===r.__text.length&&1===i.anchor.offset?2:0}const l=s[0],c=e._nodeMap.get(l.__key);if(!Wg(c)||!Wg(l)||c.__mode!==l.__mode)return 0;const u=c.__text,f=l.__text;if(u===f)return 0;const d=i.anchor,p=a.anchor;if(d.key!==p.key||"text"!==d.type)return 0;const h=d.offset,m=p.offset,y=f.length-u.length;return 1===y&&m===h-1?2:-1===y&&m===h+1?3:-1===y&&m===h?4:0}(o,i,s,l,e.isComposing()),d=(()=>{const d=null===a||a.editor===e,p=c.has("history-push");if(!p&&d&&c.has("history-merge"))return 0;if(null===o)return 1;const h=i._selection;return s.size>0||l.size>0?!1===p&&0!==f&&f===r&&u<n+t&&d||1===s.size&&function(e,t,n){const r=t._nodeMap.get(e),o=n._nodeMap.get(e),i=t._selection,a=n._selection;return!(Zg(i)&&Zg(a)&&"element"===i.anchor.type&&"element"===i.focus.type&&"text"===a.anchor.type&&"text"===a.focus.type||!Wg(r)||!Wg(o)||r.__parent!==o.__parent)&&JSON.stringify(t.read((()=>r.exportJSON())))===JSON.stringify(n.read((()=>o.exportJSON())))}(Array.from(s)[0],o,i)?0:1:null!==h?0:2})();return n=u,r=f,d}}(e,n);return hb(e.registerCommand(Lp,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==r.length){const o=t.current,i=r.pop();null!==o&&(n.push(o),e.dispatchCommand(sh,!0)),0===r.length&&e.dispatchCommand(lh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(zp,(()=>(function(e,t){const n=t.redoStack,r=t.undoStack;if(0!==n.length){const o=t.current;null!==o&&(r.push(o),e.dispatchCommand(lh,!0));const i=n.pop();0===n.length&&e.dispatchCommand(sh,!1),t.current=i||null,i&&i.editor.setEditorState(i.editorState,{tag:"historic"})}}(e,t),!0)),0),e.registerCommand(ih,(()=>(Ib(t),!1)),0),e.registerCommand(ah,(()=>(Ib(t),e.dispatchCommand(sh,!1),e.dispatchCommand(lh,!1),!0)),0),e.registerUpdateListener((({editorState:n,prevEditorState:o,dirtyLeaves:i,dirtyElements:a,tags:s})=>{const l=t.current,c=t.redoStack,u=t.undoStack,f=null===l?null:l.editorState;if(null!==l&&n===f)return;const d=r(o,n,l,i,a,s);if(1===d)0!==c.length&&(t.redoStack=[],e.dispatchCommand(sh,!1)),null!==l&&(u.push({...l}),e.dispatchCommand(lh,!0));else if(2===d)return;t.current={editor:e,editorState:n}})))}(e,r,n)),[n,e,r])}(n,t,e),null}function Lb(e,t){return(Lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var zb={error:null},Bb=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).state=zb,t.resetErrorBoundary=function(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];null==t.props.onReset||(e=t.props).onReset.apply(e,r),t.reset()},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Lb(t,n),r.getDerivedStateFromError=function(e){return{error:e}};var o=r.prototype;return o.reset=function(){this.setState(zb)},o.componentDidCatch=function(e,t){var n,r;null==(n=(r=this.props).onError)||n.call(r,e,t)},o.componentDidUpdate=function(e,t){var n,r,o,i,a=this.state.error,s=this.props.resetKeys;null!==a&&null!==t.error&&(void 0===(o=e.resetKeys)&&(o=[]),void 0===(i=s)&&(i=[]),o.length!==i.length||o.some((function(e,t){return!Object.is(e,i[t])})))&&(null==(n=(r=this.props).onResetKeysChange)||n.call(r,e.resetKeys,s),this.reset())},o.render=function(){var e=this.state.error,t=this.props,n=t.fallbackRender,r=t.FallbackComponent,o=t.fallback;if(null!==e){var i={error:e,resetErrorBoundary:this.resetErrorBoundary};if(f.isValidElement(o))return o;if("function"==typeof n)return n(i);if(r)return f.createElement(r,i);throw new Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},r}(f.Component);function Fb({children:e,onError:t}){return(0,u.jsx)(Bb,{fallback:(0,u.jsx)("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}const Wb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?f.useLayoutEffect:f.useEffect;function Vb({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=Op();return Wb((()=>{if(n)return r.registerUpdateListener((({editorState:o,dirtyElements:i,dirtyLeaves:a,prevEditorState:s,tags:l})=>{t&&0===i.size&&0===a.size||e&&l.has("history-merge")||s.isEmpty()||n(o,r,l)}))}),[r,e,t,n]),null}function $b({editorRef:e}){const[t]=Op();return f.useEffect((()=>{"function"==typeof e?e(t):"object"==typeof e&&(e.current=t)}),[t]),null}const Ub={sm:"px-3 py-1.5 rounded [&_.editor-content>p]:text-xs [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-xs [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-5",md:"px-3.5 py-2 rounded-md [&_.editor-content>p]:text-sm [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-sm [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-6",lg:"px-4 py-2.5 rounded-md [&_.editor-content>p]:text-base [&_.editor-content>p]:font-normal [&_.pointer-events-none]:text-base [&_.pointer-events-none]:font-normal [&_.editor-content>p]:content-center [&_.editor-content>p]:min-h-7"},Kb={sm:"p-1.5 rounded-md max-h-[10.75rem]",md:"p-2 rounded-lg max-h-[13.5rem]",lg:"p-2 rounded-lg max-h-[13.5rem]"},qb={sm:"p-1.5 rounded text-xs leading-5 font-normal",md:"p-2 rounded-md text-sm leading-6 font-normal",lg:"p-2 rounded-md text-base leading-6 font-normal"},Hb="startTransition",Yb=typeof window<"u"&&void 0!==window.document&&void 0!==window.document.createElement?f.useLayoutEffect:f.useEffect,Xb=e=>{const t=document.getElementById("typeahead-menu");if(!t)return;const n=t.getBoundingClientRect();n.top+n.height>window.innerHeight&&t.scrollIntoView({block:"center"}),n.top<0&&t.scrollIntoView({block:"center"}),e.scrollIntoView({block:"nearest"})};function Gb(e,t){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.top>r.top&&n.top<r.bottom}const Zb={};function Jb({close:e,editor:t,anchorElementRef:n,resolution:r,options:o,menuRenderFn:i,onSelectOption:a,shouldSplitNodeWithQuery:s=!1,commandPriority:l=1}){const[c,u]=(0,f.useState)(null),d=r.match&&r.match.matchingString;(0,f.useEffect)((()=>{u(0)}),[d]);const p=(0,f.useCallback)((n=>{t.update((()=>{const t=null!=r.match&&s?function(e){const t=uv();if(!Zg(t)||!t.isCollapsed())return null;const n=t.anchor;if("text"!==n.type)return null;const r=n.getNode();if(!r.isSimpleText())return null;const o=n.offset,i=r.getTextContent().slice(0,o),a=e.replaceableString.length,s=o-function(e,t,n){let r=n;for(let n=r;n<=t.length;n++)e.substr(-n)===t.substr(0,n)&&(r=n);return r}(i,e.matchingString,a);if(s<0)return null;let l;return 0===s?[l]=r.splitText(o):[,l]=r.splitText(s,o),l}(r.match):null;a(n,t,e,r.match?r.match.matchingString:"")}))}),[t,s,r.match,a,e]),h=(0,f.useCallback)((e=>{const n=t.getRootElement();null!==n&&(n.setAttribute("aria-activedescendant","typeahead-item-"+e),u(e))}),[t]);return(0,f.useEffect)((()=>()=>{const e=t.getRootElement();null!==e&&e.removeAttribute("aria-activedescendant")}),[t]),Yb((()=>{null===o?u(null):null===c&&h(0)}),[o,c,h]),(0,f.useEffect)((()=>hb(t.registerCommand(Zb,(({option:e})=>!(!e.ref||null==e.ref.current||(Xb(e.ref.current),0))),l))),[t,h,l]),(0,f.useEffect)((()=>hb(t.registerCommand(Kp,(e=>{const n=e;if(null!==o&&o.length&&null!==c){const e=c!==o.length-1?c+1:0;h(e);const r=o[e];null!=r.ref&&r.ref.current&&t.dispatchCommand(Zb,{index:e,option:r}),n.preventDefault(),n.stopImmediatePropagation()}return!0}),l),t.registerCommand(Up,(e=>{const t=e;if(null!==o&&o.length&&null!==c){const e=0!==c?c-1:o.length-1;h(e);const n=o[e];null!=n.ref&&n.ref.current&&Xb(n.ref.current),t.preventDefault(),t.stopImmediatePropagation()}return!0}),l),t.registerCommand(Xp,(t=>{const n=t;return n.preventDefault(),n.stopImmediatePropagation(),e(),!0}),l),t.registerCommand(Zp,(e=>{const t=e;return null!==o&&null!==c&&null!=o[c]&&(t.preventDefault(),t.stopImmediatePropagation(),p(o[c]),!0)}),l),t.registerCommand(qp,(e=>null!==o&&null!==c&&null!=o[c]&&(null!==e&&(e.preventDefault(),e.stopImmediatePropagation()),p(o[c]),!0)),l))),[p,e,t,o,c,h,l]),i(n,(0,f.useMemo)((()=>({options:o,selectOptionAndCleanUp:p,selectedIndex:c,setHighlightedIndex:u})),[p,c,o]),r.match?r.match.matchingString:"")}function Qb({options:e,onQueryChange:t,onSelectOption:n,onOpen:r,onClose:o,menuRenderFn:i,triggerFn:a,anchorClassName:s,commandPriority:l=1,parent:c}){const[d]=Op(),[p,h]=(0,f.useState)(null),m=function(e,t,n,r=document.body){const[o]=Op(),i=(0,f.useRef)(document.createElement("div")),a=(0,f.useCallback)((()=>{i.current.style.top=i.current.style.bottom;const t=o.getRootElement(),a=i.current,s=a.firstChild;if(null!==t&&null!==e){const{left:o,top:l,width:c,height:u}=e.getRect(),f=i.current.offsetHeight;if(a.style.top=`${l+window.pageYOffset+f+3}px`,a.style.left=`${o+window.pageXOffset}px`,a.style.height=`${u}px`,a.style.width=`${c}px`,null!==s){s.style.top=`${l}`;const e=s.getBoundingClientRect(),n=e.height,r=e.width,i=t.getBoundingClientRect();o+r>i.right&&(a.style.left=`${i.right-r+window.pageXOffset}px`),(l+n>window.innerHeight||l+n>i.bottom)&&l-i.top>n+u&&(a.style.top=l-n+window.pageYOffset-u+"px")}a.isConnected||(null!=n&&(a.className=n),a.setAttribute("aria-label","Typeahead menu"),a.setAttribute("id","typeahead-menu"),a.setAttribute("role","listbox"),a.style.display="block",a.style.position="absolute",r.append(a)),i.current=a,t.setAttribute("aria-controls","typeahead-menu")}}),[o,e,n,r]);(0,f.useEffect)((()=>{const t=o.getRootElement();if(null!==e)return a(),()=>{null!==t&&t.removeAttribute("aria-controls");const e=i.current;null!==e&&e.isConnected&&e.remove()}}),[o,a,e]);const s=(0,f.useCallback)((n=>{null!==e&&(n||t(null))}),[e,t]);return function(e,t,n,r){const[o]=Op();(0,f.useEffect)((()=>{if(null!=t&&null!=e){const e=o.getRootElement(),i=null!=e?function(e){let t=getComputedStyle(e);const n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.body;for(let o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.body}(e):document.body;let a=!1,s=Gb(t,i);const l=function(){a||(window.requestAnimationFrame((function(){n(),a=!1})),a=!0);const e=Gb(t,i);e!==s&&(s=e,null!=r&&r(e))},c=new ResizeObserver(n);return window.addEventListener("resize",n),document.addEventListener("scroll",l,{capture:!0,passive:!0}),c.observe(t),()=>{c.unobserve(t),window.removeEventListener("resize",n),document.removeEventListener("scroll",l,!0)}}}),[t,o,r,n,e])}(e,i.current,a,s),i}(p,h,s,c),y=(0,f.useCallback)((()=>{h(null),null!=o&&null!==p&&o()}),[o,p]),g=(0,f.useCallback)((e=>{h(e),null!=r&&null===p&&r(e)}),[r,p]);return(0,f.useEffect)((()=>{const e=d.registerUpdateListener((()=>{d.getEditorState().read((()=>{const e=d._window||window,n=e.document.createRange(),r=uv(),o=function(e){let t=null;return e.getEditorState().read((()=>{const e=uv();Zg(e)&&(t=function(e){const t=e.anchor;if("text"!==t.type)return null;const n=t.getNode();if(!n.isSimpleText())return null;const r=t.offset;return n.getTextContent().slice(0,r)}(e))})),t}(d);if(!Zg(r)||!r.isCollapsed()||null===o||null===n)return void y();const i=a(o,d);if(t(i?i.matchingString:null),null!==i&&(s=d,0!==i.leadOffset||!s.getEditorState().read((()=>{const e=uv();if(Zg(e)){const t=e.anchor.getNode().getPreviousSibling();return Wg(t)&&t.isTextEntity()}return!1})))&&null!==function(e,t,n){const r=n.getSelection();if(null===r||!r.isCollapsed)return!1;const o=r.anchorNode,i=e,a=r.anchorOffset;if(null==o||null==a)return!1;try{t.setStart(o,i),t.setEnd(o,a)}catch{return!1}return!0}(i.leadOffset,n,e))return l=()=>g({getRect:()=>n.getBoundingClientRect(),match:i}),void(Hb in f?f[Hb](l):l());var s,l;y()}))}));return()=>{e()}}),[d,a,t,p,y,g]),null===p||null===d?null:(0,u.jsx)(Jb,{close:y,resolution:p,editor:d,anchorElementRef:m,options:e,menuRenderFn:i,shouldSplitNodeWithQuery:!0,onSelectOption:n,commandPriority:l})}const ex=e=>{switch(e){case"sm":return"xs";case"md":default:return"sm";case"lg":return"md"}},tx=({data:e,by:t,size:n,nodeKey:r})=>{const[o]=Op(),i=!o.isEditable();let a=e;"object"==typeof e&&(a=e[t]);const s=(0,f.useCallback)((e=>{const t=wm(r);if(!t||!t.isSelected())return!1;let n=!1;const o=t.getPreviousSibling();return Wv(o)&&(o.selectEnd(),n=!0),Wg(o)&&(o.select(),n=!0),Uv(o)&&(o.selectNext(),n=!0),null===o&&(t.selectPrevious(),n=!0),n&&e.preventDefault(),n}),[r]),l=(0,f.useCallback)((e=>{const t=wm(r);if(!t||!t.isSelected())return!1;let n=!1;const o=t.getNextSibling();return Wv(o)&&(o.selectStart(),n=!0),Wg(o)&&(o.select(0,0),n=!0),Uv(o)&&(o.selectPrevious(),n=!0),null===o&&(t.selectNext(),n=!0),n&&e.preventDefault(),n}),[r]);return(0,f.useEffect)((()=>{const e=hb(o.registerCommand(Vp,s,1),o.registerCommand(Fp,l,1));return()=>{e()}}),[o,s,l]),(0,u.jsx)(Ho,{className:"inline-flex mr-0.5",type:"rounded",size:ex(n),label:a,icon:null,closable:!0,onClose:e=>{e.stopPropagation(),e.preventDefault(),!i&&o.update((()=>{const e=wm(r);e&&e.remove()}))},disabled:i})};class nx extends $v{constructor(e,t,n,r){super(r),v(this,"__data"),v(this,"__by"),v(this,"__size"),this.__data=e,this.__by=t,this.__size=n}static getType(){return"mention"}static clone(e){return new nx(e.__data,e.__by,e.__size,e.__key)}static importJSON(e){return rx(e.data,e.by,e.size)}createDOM(){return document.createElement("span")}updateDOM(){return!1}exportDOM(){return{element:document.createElement("span")}}exportJSON(){return{type:nx.getType(),data:this.__data,by:this.__by,size:this.__size,version:1}}decorate(){return(0,u.jsx)(tx,{data:this.__data,by:this.__by,size:this.__size,nodeKey:this.__key})}}const rx=(e,t,n)=>new nx(e,t,n);class ox{constructor(e){v(this,"data"),v(this,"key"),v(this,"ref"),v(this,"setRefElement"),this.initData=e,this.key="",this.data=e,this.ref={current:null},this.setRefElement=e=>{this.ref.current=e}}}const ix=new Map,ax={search(e,t,n,r){setTimeout((()=>{if(!Array.isArray(e))return[];const o=e.filter((e=>{var n;if("string"==typeof e)return e.toLowerCase().includes(t.toLowerCase());const o=null==(n=null==e?void 0:e[r])?void 0:n.toString();return!!o&&o.toLowerCase().includes(t.toLowerCase())}));n(o)}),500)}},sx=({size:e,className:t,children:n})=>(0,u.jsx)("ul",{role:"menu",className:ve("absolute inset-x-0 top-full mt-2 mx-0 mb-0 w-full h-auto overflow-y-auto overflow-x-hidden z-10 bg-background-primary border border-solid border-border-subtle shadow-lg",Kb[e],t),children:n});sx.displayName="EditorCombobox";const lx=(0,f.forwardRef)((({size:e,children:t,selected:n=!1,className:r,...o},i)=>(0,u.jsx)("li",{role:"option",ref:i,className:ve("m-0 text-text-primary cursor-pointer",qb[e],n&&"bg-button-tertiary-hover",r),...o,children:t})));lx.displayName="EditorCombobox.Item",sx.Item=lx;const cx=({optionsArray:e,by:t="name",size:n="md",trigger:r="@",menuComponent:o=sx,menuItemComponent:i=sx.Item,autoSpace:a=!0})=>{const s=(0,f.useRef)(!1),l="\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'\"~=<>_:;",c=[r].join(""),d="[^"+c+l+"\\s]",p=new RegExp(`(^|\\s|\\()([${c}]((?:${d}${"(?:\\.[ |$]| |["+l+"]|)"}){0,75}))$`),h=new RegExp(`(^|\\s|\\()([${c}]((?:${d}){0,50}))$`),[m]=Op(),[y,g]=(0,f.useState)(null),v=function(e,t,n="name"){const[r,o]=(0,f.useState)([]);return(0,f.useEffect)((()=>{if(null===t)return void o([]);const r=ix.get(t);if(null!==r){if(void 0!==r)return void o(r);ix.set(t,null),ax.search(e,t,(e=>{ix.set(t,e),o(e)}),n)}}),[t]),r}(e,y,t),b=(0,f.useCallback)(((e,r,o)=>{m.update((()=>{const i=rx(e.data,t,n);r&&r.replace(i),o()}))}),[m]),x=(0,f.useMemo)((()=>v.map((e=>new ox(e)))),[m,v]),w=(0,f.useCallback)((e=>{if(!a)return!1;const{key:t,ctrlKey:n,metaKey:r}=e;if(n||r||" "===t||t.length>1||s.current)return s.current&&(s.current=!1),!1;const o=uv(),{focus:i,anchor:l}=o,[c]=o.getNodes();if(!l||!i||(null==l?void 0:l.key)!==(null==i?void 0:i.key)||(null==l?void 0:l.offset)!==(null==i?void 0:i.offset)||!c)return!1;if((e=>e instanceof nx)(c)){const e=Fg(" ");return c.insertAfter(e),!0}return!1}),[m,r,a]),_=(0,f.useCallback)((e=>{const{key:t}=e;return"Backspace"===t&&(s.current=!0,!0)}),[s]);return(0,f.useEffect)((()=>{if(m)return hb(m.registerCommand(Bp,w,1),m.registerCommand(Yp,_,1))}),[m,w]),(0,u.jsx)(Qb,{onQueryChange:g,onSelectOption:b,triggerFn:e=>{let t=p.exec(e);if(null===t&&(t=h.exec(e)),null!==t){const e=t[1],n=t[3];if(n.length>=0)return{leadOffset:t.index+e.length,matchingString:n,replaceableString:t[2]}}return null},options:x,menuRenderFn:(e,{selectedIndex:r,selectOptionAndCleanUp:a,setHighlightedIndex:s})=>e.current&&null!=x&&x.length?(0,u.jsx)(o,{size:n,children:x.map(((e,o)=>{var l;return(0,u.jsx)(i,{ref:e.ref,size:n,selected:o===r,onMouseEnter:()=>{s(o)},onClick:()=>a(e),children:"string"==typeof e.data?e.data:null==(l=e.data)?void 0:l[t]},o)}))}):null})},ux={ltr:"ltr",rtl:"rtl",paragraph:"editor-paragraph",quote:"editor-quote",heading:{h1:"editor-heading-h1",h2:"editor-heading-h2",h3:"editor-heading-h3",h4:"editor-heading-h4",h5:"editor-heading-h5",h6:"editor-heading-h6"},list:{nested:{listitem:"editor-nested-listitem"},ol:"editor-list-ol",ul:"editor-list-ul",listitem:"editor-listItem",listitemChecked:"editor-listItemChecked",listitemUnchecked:"editor-listItemUnchecked"},hashtag:"editor-hashtag",image:"editor-image",link:"editor-link",text:{bold:"editor-textBold",code:"editor-textCode",italic:"editor-textItalic",strikethrough:"editor-textStrikethrough",subscript:"editor-textSubscript",superscript:"editor-textSuperscript",underline:"editor-textUnderline",underlineStrikethrough:"editor-textUnderlineStrikethrough"},code:"editor-code",codeHighlight:{atrule:"editor-tokenAttr",attr:"editor-tokenAttr",boolean:"editor-tokenProperty",builtin:"editor-tokenSelector",cdata:"editor-tokenComment",char:"editor-tokenSelector",class:"editor-tokenFunction","class-name":"editor-tokenFunction",comment:"editor-tokenComment",constant:"editor-tokenProperty",deleted:"editor-tokenProperty",doctype:"editor-tokenComment",entity:"editor-tokenOperator",function:"editor-tokenFunction",important:"editor-tokenVariable",inserted:"editor-tokenSelector",keyword:"editor-tokenAttr",namespace:"editor-tokenVariable",number:"editor-tokenProperty",operator:"editor-tokenOperator",prolog:"editor-tokenComment",property:"editor-tokenProperty",punctuation:"editor-tokenPunctuation",regex:"editor-tokenVariable",selector:"editor-tokenSelector",string:"editor-tokenSelector",symbol:"editor-tokenProperty",tag:"editor-tokenProperty",url:"editor-tokenOperator",variable:"editor-tokenVariable"}},fx=({content:e})=>(0,u.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 flex items-center justify-start text-field-placeholder w-full",children:(0,u.jsx)("span",{className:"truncate",children:e})});function dx(e){console.error(e)}const px=(0,f.forwardRef)((({defaultValue:e="",placeholder:t="Press @ to view variable suggestions",onChange:n,size:r="md",autoFocus:o=!1,options:i,by:a="name",trigger:s="@",menuComponent:l,menuItemComponent:c,className:d,wrapperClassName:p,disabled:h=!1,autoSpaceAfterMention:m=!1},y)=>{const g={namespace:"Editor",editorTheme:ux,onError:dx,nodes:[nx],editorState:e||'{\n "root": {\n "children": [\n {\n "children": [],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "paragraph",\n "version": 1,\n "textFormat": 0,\n "textStyle": ""\n }\n ],\n "direction": null,\n "format": "",\n "indent": 0,\n "type": "root",\n "version": 1\n }\n}',editable:!h};let v,b;return(0,f.isValidElement)(l)&&(v=l),(0,f.isValidElement)(c)&&(b=c),(0,u.jsx)("div",{className:ve("relative w-full","focus-within:ring-2 focus-within:ring-offset-2 hover:outline-border-strong hover:focus-within:outline-focus-border focus-within:outline-focus-border focus-within:ring-focus transition-[color,outline,box-shadow] duration-150 ease-in-out outline outline-1 outline-field-border",Ub[r],h&&"bg-field-secondary-background outline-field-border-disabled hover:outline-field-border-disabled [&_p]:text-badge-color-disabled cursor-not-allowed",p),children:(0,u.jsxs)(ab,{initialConfig:g,children:[(0,u.jsx)("div",{className:"relative w-full [&_p]:m-0",children:(0,u.jsx)(Pb,{contentEditable:(0,u.jsx)(Nb,{className:ve("editor-content focus-visible:outline-none outline-none","w-full [&>p]:w-full [&>p]:m-0",d)}),placeholder:(0,u.jsx)(fx,{content:t}),ErrorBoundary:Fb})}),(0,u.jsx)(Rb,{}),(0,u.jsx)(cx,{menuComponent:v,menuItemComponent:b,size:r,by:a,optionsArray:i,trigger:s,autoSpace:m}),(0,u.jsx)(Vb,{onChange:(e,t)=>{"function"==typeof n&&n(e,t)},ignoreSelectionChange:!0}),y&&(0,u.jsx)($b,{editorRef:y}),o&&(0,u.jsx)(kp,{})]})})}));px.displayName="EditorInput";const hx=(0,f.createContext)({}),mx=()=>(0,f.useContext)(hx),yx=({size:e="md",children:t,className:n})=>(0,u.jsx)(hx.Provider,{value:{size:e},children:(0,u.jsx)("div",{className:ve("flex flex-col bg-background-primary p-2",n),children:t})});yx.displayName="Menu";const gx=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:r=!0,onClick:o,children:i,className:a})=>{const[s,l]=(0,f.useState)(r),[c,d]=(0,f.useState)(!1),{size:p}=mx(),h={sm:"text-xs",md:"text-sm"}[p??"md"],m={sm:"size-4",md:"size-5"}[p??"md"],y=()=>{l(!s),o&&o(!s)};return(0,u.jsxs)("div",{children:[!!e&&(0,u.jsxs)("div",{role:"button",tabIndex:0,onClick:y,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&y()},onMouseEnter:()=>n&&d(!0),onMouseLeave:()=>n&&d(!1),className:ve("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",h,e?"p-1":"p-0",a),"aria-expanded":s,children:[(0,u.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,u.jsx)(dd.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:n?s||c?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,u.jsx)(dd.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:s?"open":"closed",transition:{duration:.15},children:(0,u.jsx)(Ie,{className:ve("shrink-0",m)})})})]}),(0,u.jsx)(bd,{initial:!1,children:s&&(0,u.jsx)(dd.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:i})})]})};gx.displayName="Menu.List";const vx=({disabled:e=!1,active:t,onClick:n,children:r,className:o})=>{const{size:i}=mx(),a={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[i??"md"];return(0,u.jsx)("li",{role:"menuitem",tabIndex:0,onClick:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(null==n||n())},className:ve("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",a,"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),children:r})};vx.displayName="Menu.Item";const bx=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return(0,u.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,u.jsx)("hr",{className:ve("w-full border-0 border-t border-border-subtle",n,t)})})};bx.displayName="Menu.Separator",yx.List=gx,yx.Item=vx,yx.Separator=bx;const xx=(0,f.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),wx=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,borderOn:o=!0,...i})=>{const a=(0,f.useRef)(null),[s,l]=(0,f.useState)((()=>{const e=Se("sidebar-collapsed"),t=window.innerWidth<1280;return e||t}));return(0,f.useEffect)((()=>{n&&n(s)}),[s,n]),(0,f.useEffect)((()=>{const e=()=>{const e=window.innerWidth<1280;if(r)if(e)l(!0),_e("sidebar-collapsed",!0);else{const e=Se("sidebar-collapsed");l(e||!1)}else l(!1),(e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(e){console.error(e)}})("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}}),[r]),(0,u.jsx)(xx.Provider,{value:{isCollapsed:s,setIsCollapsed:l,collapsible:r},children:(0,u.jsx)("div",{ref:a,className:ve("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",o&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",s&&"w-16 px-2",t),...i,children:e})})};wx.displayName="Sidebar";const _x=({children:e})=>(0,u.jsx)("div",{className:"space-y-2",children:e});_x.displayName="Sidebar.Header";const Sx=({children:e})=>(0,u.jsx)("div",{className:ve("space-y-4 grow items-start"),children:e});Sx.displayName="Sidebar.Body";const Ox=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=(0,f.useContext)(xx);return(0,u.jsxs)("div",{className:"space-y-4",children:[e,r&&(0,u.jsx)("button",{className:ve("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{n(!t),_e("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(Wo,{title:"Expand",children:(0,u.jsx)(Ue,{className:"size-5"})})}):(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)($e,{className:"size-5"})," Collapse"]})})]})};Ox.displayName="Sidebar.Footer";const kx=({children:e,className:t})=>(0,u.jsx)("div",{className:ve("w-full",t),children:e});kx.displayName="Sidebar.Item",Object.assign(wx,{Header:_x,Body:Sx,Footer:Ox,Item:kx});const jx={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},Ex=(0,f.createContext)({sizes:jx.sm}),Px=({children:e,size:t="sm"})=>{const n=jx[t]||jx.sm;return(0,u.jsx)(Ex.Provider,{value:{sizes:n},children:(0,u.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,u.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};Px.displayName="Breadcrumb";const Cx=({children:e})=>(0,u.jsx)(u.Fragment,{children:e});Cx.displayName="Breadcrumb.List";const Tx=({children:e})=>(0,u.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});Tx.displayName="Breadcrumb.Item";const Ax=({href:e,children:t,className:n,as:r="a",...o})=>{const{sizes:i}=(0,f.useContext)(Ex);return(0,u.jsx)(r,{href:e,className:ve(i.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",n),...o,children:t})};Ax.displayName="Breadcrumb.Link";const Mx=({type:e})=>{const{sizes:t}=(0,f.useContext)(Ex),n={slash:(0,u.jsx)("span",{className:ve("mx-1",t.separator),children:"/"}),arrow:(0,u.jsx)(Le,{size:t.separatorIconSize})};return(0,u.jsx)("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:n[e]||n.arrow})};Mx.displayName="Breadcrumb.Separator";const Nx=()=>{const{sizes:e}=(0,f.useContext)(Ex);return(0,u.jsx)(Be,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};Nx.displayName="Breadcrumb.Ellipsis";const Dx=({children:e})=>{const{sizes:t}=(0,f.useContext)(Ex);return(0,u.jsx)("span",{className:ve(t.text,"font-medium text-text-primary"),children:e})};Dx.displayName="Breadcrumb.Page",Px.List=Cx,Px.Item=Tx,Px.Link=Ax,Px.Separator=Mx,Px.Ellipsis=Nx,Px.Page=Dx;const Ix=(0,f.createContext)({}),Rx=()=>(0,f.useContext)(Ix),Lx={open:{opacity:1},exit:{opacity:0}},zx={duration:.2},Bx=({open:e,setOpen:t,children:n,trigger:r=null,className:o,exitOnClickOutside:i=!1,exitOnEsc:a=!0,design:s="simple",scrollLock:l=!0})=>{const c=void 0!==e&&void 0!==t,[d,p]=(0,f.useState)(!1),h=(0,f.useRef)(null),m=(0,f.useRef)(null),y=(0,f.useMemo)((()=>c?e:d),[e,d]),g=(0,f.useMemo)((()=>c?t:p),[p,p]),v=()=>{y||g(!0)},b=()=>{y&&g(!1)},x=(0,f.useCallback)((()=>{var e;return(0,f.isValidElement)(r)?(0,f.cloneElement)(r,{onClick:be(v,null==(e=null==r?void 0:r.props)?void 0:e.onClick)}):"function"==typeof r?r({onClick:v}):null}),[r,v,b]),w=e=>{"Escape"===e.key&&a&&b()},_=e=>{i&&h.current&&!h.current.contains(e.target)&&b()};return(0,f.useEffect)((()=>(window.addEventListener("keydown",w),document.addEventListener("mousedown",_),()=>{window.removeEventListener("keydown",w),document.removeEventListener("mousedown",_)})),[y]),(0,f.useEffect)((()=>{if(!l)return;const e=document.querySelector("html");return y&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}}),[y]),(0,u.jsxs)(u.Fragment,{children:[x(),(0,u.jsx)(Ix.Provider,{value:{open:y,setOpen:g,handleClose:b,design:s,dialogContainerRef:m,dialogRef:h},children:(0,u.jsx)("div",{ref:m,className:ve("fixed z-999999 w-0 h-0 overflow-visible",o),children:n})})]})};Bx.displayName="Dialog";const Fx=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:o}=Rx();return(0,u.jsx)(bd,{children:n&&(0,u.jsx)(dd.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:Lx,role:"dialog",transition:zx,children:(0,u.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,u.jsx)("div",{ref:o,className:ve("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:r}):e})})})})};Fx.displayName="Dialog.Panel";const Wx=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=Rx();return null!=r&&r.current?(0,u.jsx)(u.Fragment,{children:(0,p.createPortal)((0,u.jsx)(bd,{children:n&&(0,u.jsx)(dd.div,{className:ve("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:Lx,transition:zx})}),r.current)}):null};Wx.displayName="Dialog.Backdrop";const Vx=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ve("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});Vx.displayName="Dialog.Header";const $x=({children:e,as:t="h3",className:n,...r})=>(0,u.jsx)(t,{className:ve("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});$x.displayName="Dialog.Title";const Ux=({children:e,as:t="p",className:n,...r})=>(0,u.jsx)(t,{className:ve("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});Ux.displayName="Dialog.Description";const Kx=({className:e,...t})=>(0,u.jsx)("button",{className:ve("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,u.jsx)(Ze,{className:"size-4 text-text-primary shrink-0"})}),qx=({children:e,as:t=f.Fragment,...n})=>{const{handleClose:r}=Rx();return e?t===f.Fragment?"function"==typeof e?e({close:r}):(0,f.cloneElement)(e,{onClick:r}):(0,u.jsx)(t,{...n,onClick:r,children:e}):(0,u.jsx)(Kx,{onClick:r,...n})};qx.displayName="Dialog.CloseButton";const Hx=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ve("px-5",t),...n,children:e});Hx.displayName="Dialog.Body";const Yx=({children:e,className:t})=>{const{design:n,handleClose:r}=Rx();return(0,u.jsx)("div",{className:ve("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};Yx.displayName="Dialog.Footer",Bx.Panel=Fx,Bx.Title=$x,Bx.Description=Ux,Bx.CloseButton=qx,Bx.Header=Vx,Bx.Body=Hx,Bx.Footer=Yx,Bx.Backdrop=Wx;const Xx=({children:e,gap:t="lg",className:n,...r})=>(0,u.jsx)("div",{className:ve("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",xe(t),n),...r,children:e});Xx.displayName="Topbar";const Gx=({gap:e="sm",children:t,className:n})=>(0,u.jsx)("div",{className:ve("flex items-center",xe(e),n),children:t});Gx.displayName="Topbar.Left";const Zx=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,u.jsx)("div",{className:ve("flex items-center grow",xe(e),o,r),children:t})};Zx.displayName="Topbar.Middle";const Jx=({gap:e="sm",children:t,className:n})=>(0,u.jsx)("div",{className:ve("flex items-center",xe(e),n),children:t});Jx.displayName="Topbar.Right";const Qx=({children:e,className:t})=>(0,u.jsx)("div",{className:ve("flex items-center [&>svg]:block h-full",t),children:e});Qx.displayName="Topbar.Item",Xx.Left=Gx,Xx.Middle=Zx,Xx.Right=Jx,Xx.Item=Qx;const ew=(0,f.createContext)({}),tw=ew.Provider,nw=()=>(0,f.useContext)(ew),rw=(e,t,n)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const r=null==e?void 0:e.getBoundingClientRect(),o=null==t?void 0:t.getBoundingClientRect(),i=n?(null==r?void 0:r.x)-(null==o?void 0:o.x)+(null==r?void 0:r.width)/2:(null==o?void 0:o.width)-((null==o?void 0:o.right)-(null==r?void 0:r.x))+(null==r?void 0:r.width)/2,a=(null==r?void 0:r.y)-(null==o?void 0:o.y)+(null==r?void 0:r.height)/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${(null==r?void 0:r.width)/2}px at ${i}px ${a}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},ow=e=>(0,u.jsx)(dd.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),iw=({className:e})=>{const{toggleOpen:t,setTriggerRef:n}=nw();return(0,u.jsx)(Oe,{ref:n,className:ve("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu",icon:(0,u.jsxs)(dd.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[(0,u.jsx)(ow,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,u.jsx)(ow,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,u.jsx)(ow,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},aw={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},sw=({tag:e="a",active:t,icon:n,iconPosition:r="left",className:o,children:i,...a})=>{var s;let l=null,c=null;const d=n&&(0,f.isValidElement)(n)?(0,f.cloneElement)(n,{key:"left-icon",className:ve("size-5",t?"text-brand-800":"text-icon-secondary",(null==(s=n.props)?void 0:s.className)??"")}):null;switch(r){case"left":l=d;break;case"right":c=d;break;default:l=null,c=null}return(0,u.jsx)(cw,{children:(0,u.jsxs)(e,{className:ve("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",o),...a,children:[!!l&&l,(0,u.jsx)("span",{className:"contents",children:i}),!!c&&c]})})},lw={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},cw=({children:e})=>(0,u.jsx)(dd.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:lw,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),uw=({children:e,className:t})=>{const{triggerRef:n,triggerOnRight:r,triggerOnLeft:o}=nw(),[i,a]=(0,f.useState)(null);return n?(0,u.jsxs)(dd.div,{ref:a,className:ve("absolute top-0 bottom-0 w-80 h-screen",r?"right-0":"left-0",t),children:[i&&(0,u.jsx)(dd.div,{className:ve("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",r?"right-0":"left-0"),variants:rw(n,i,o??!1)}),(0,u.jsx)(dd.ul,{variants:aw,className:ve("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},fw=({className:e,children:t})=>{const[n,r]=function(...e){const t=(0,f.useRef)(0),[n,r]=(0,f.useState)(e[t.current]),o=(0,f.useCallback)((n=>{t.current="number"!=typeof n?((e,t,n)=>{const r=t-0;return((n-0)%r+r)%r+0})(0,e.length,t.current+1):n,r(e[t.current])}),[e.length,...e]);return[n,o]}(!1,!0),[o,i]=(0,f.useState)(null),a=(0,f.useRef)(null),{height:s}=(e=>{const t=(0,f.useRef)({width:0,height:0});return(0,f.useEffect)((()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)}),[]),t.current})(a),{isRight:l=!1,isLeft:c=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),n=window.innerWidth,r=n/2,o=t.right<r,i=t.left>r;return{isLeft:o,isRight:i,isCenter:!o&&!i,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:n,center:r}}})(o);return(0,u.jsx)(tw,{value:{isOpen:n,toggleOpen:r,setTriggerRef:e=>{(0,f.startTransition)((()=>{i(e)}))},triggerRef:o,triggerOnRight:l,triggerOnLeft:c},children:(0,u.jsx)("div",{className:ve("size-6 z-[1]",e),children:(0,u.jsx)(dd.nav,{className:"h-full",initial:!1,animate:n?"open":"closed",custom:s,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:a,children:t})})})};fw.displayName="HamburgerMenu",iw.displayName="HamburgerMenu.Toggle",uw.displayName="HamburgerMenu.Options",sw.displayName="HamburgerMenu.Option",fw.Options=uw,fw.Option=sw,fw.Toggle=iw;var dw={exports:{}};!function(e,t){(function(){var n,r="Expected a function",o="__lodash_hash_undefined__",i="__lodash_placeholder__",a=32,s=128,l=1/0,c=9007199254740991,u=NaN,f=4294967295,d=f-1,p=f>>>1,m=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",a],["partialRight",64],["rearg",256]],y="[object Arguments]",g="[object Array]",v="[object Boolean]",b="[object Date]",x="[object Error]",w="[object Function]",_="[object GeneratorFunction]",S="[object Map]",O="[object Number]",k="[object Object]",j="[object Promise]",E="[object RegExp]",P="[object Set]",C="[object String]",T="[object Symbol]",A="[object WeakMap]",M="[object ArrayBuffer]",N="[object DataView]",D="[object Float32Array]",I="[object Float64Array]",R="[object Int8Array]",L="[object Int16Array]",z="[object Int32Array]",B="[object Uint8Array]",F="[object Uint8ClampedArray]",W="[object Uint16Array]",V="[object Uint32Array]",$=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,H=/[&<>"']/g,Y=RegExp(q.source),X=RegExp(H.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ee=/^\w*$/,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/[\\^$.*+?()[\]{}|]/g,re=RegExp(ne.source),oe=/^\s+/,ie=/\s/,ae=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,ce=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,fe=/\\(\\)?/g,de=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,me=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,ve=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,we=/['\n\r\u2028\u2029\\]/g,_e="\\ud800-\\udfff",Se="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Oe="\\u2700-\\u27bf",ke="a-z\\xdf-\\xf6\\xf8-\\xff",je="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="["+_e+"]",Te="["+Pe+"]",Ae="["+Se+"]",Me="\\d+",Ne="["+Oe+"]",De="["+ke+"]",Ie="[^"+_e+Pe+Me+Oe+ke+je+"]",Re="\\ud83c[\\udffb-\\udfff]",Le="[^"+_e+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Be="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+je+"]",We="\\u200d",Ve="(?:"+De+"|"+Ie+")",$e="(?:"+Fe+"|"+Ie+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Ke="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:"+Ae+"|"+Re+")?",He="["+Ee+"]?",Ye=He+qe+"(?:"+We+"(?:"+[Le,ze,Be].join("|")+")"+He+qe+")*",Xe="(?:"+[Ne,ze,Be].join("|")+")"+Ye,Ge="(?:"+[Le+Ae+"?",Ae,ze,Be,Ce].join("|")+")",Ze=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Qe=RegExp(Re+"(?="+Re+")|"+Ge+Ye,"g"),et=RegExp([Fe+"?"+De+"+"+Ue+"(?="+[Te,Fe,"$"].join("|")+")",$e+"+"+Ke+"(?="+[Te,Fe+Ve,"$"].join("|")+")",Fe+"?"+Ve+"+"+Ue,Fe+"+"+Ke,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Me,Xe].join("|"),"g"),tt=RegExp("["+We+_e+Se+Ee+"]"),nt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ot=-1,it={};it[D]=it[I]=it[R]=it[L]=it[z]=it[B]=it[F]=it[W]=it[V]=!0,it[y]=it[g]=it[M]=it[v]=it[N]=it[b]=it[x]=it[w]=it[S]=it[O]=it[k]=it[E]=it[P]=it[C]=it[A]=!1;var at={};at[y]=at[g]=at[M]=at[N]=at[v]=at[b]=at[D]=at[I]=at[R]=at[L]=at[z]=at[S]=at[O]=at[k]=at[E]=at[P]=at[C]=at[T]=at[B]=at[F]=at[W]=at[V]=!0,at[x]=at[w]=at[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},lt=parseFloat,ct=parseInt,ut="object"==typeof h&&h&&h.Object===Object&&h,ft="object"==typeof self&&self&&self.Object===Object&&self,dt=ut||ft||Function("return this")(),pt=t&&!t.nodeType&&t,ht=pt&&e&&!e.nodeType&&e,mt=ht&&ht.exports===pt,yt=mt&&ut.process,gt=function(){try{return ht&&ht.require&&ht.require("util").types||yt&&yt.binding&&yt.binding("util")}catch{}}(),vt=gt&>.isArrayBuffer,bt=gt&>.isDate,xt=gt&>.isMap,wt=gt&>.isRegExp,_t=gt&>.isSet,St=gt&>.isTypedArray;function Ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function kt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Et(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ct(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function Tt(e,t){return!(null==e||!e.length)&&Ft(e,t,0)>-1}function At(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Mt(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Nt(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Dt(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function It(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Lt=Ut("length");function zt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function Bt(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Ft(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):Bt(e,Vt,n)}function Wt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Vt(e){return e!=e}function $t(e,t){var n=null==e?0:e.length;return n?Ht(e,t)/n:u}function Ut(e){return function(t){return null==t?n:t[e]}}function Kt(e){return function(t){return null==e?n:e[t]}}function qt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Ht(e,t){for(var r,o=-1,i=e.length;++o<i;){var a=t(e[o]);a!==n&&(r=r===n?a:r+a)}return r}function Yt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Xt(e){return e&&e.slice(0,dn(e)+1).replace(oe,"")}function Gt(e){return function(t){return e(t)}}function Zt(e,t){return Mt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Qt(e,t){for(var n=-1,r=e.length;++n<r&&Ft(t,e[n],0)>-1;);return n}function en(e,t){for(var n=e.length;n--&&Ft(t,e[n],0)>-1;);return n}var tn=Kt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),nn=Kt({"&":"&","<":"<",">":">",'"':""","'":"'"});function rn(e){return"\\"+st[e]}function on(e){return tt.test(e)}function an(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function sn(e,t){return function(n){return e(t(n))}}function ln(e,t){for(var n=-1,r=e.length,o=0,a=[];++n<r;){var s=e[n];(s===t||s===i)&&(e[n]=i,a[o++]=n)}return a}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function un(e){return on(e)?function(e){for(var t=Qe.lastIndex=0;Qe.test(e);)++t;return t}(e):Lt(e)}function fn(e){return on(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.split("")}(e)}function dn(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var pn=Kt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function e(t){var h,ie=(t=null==t?dt:hn.defaults(dt.Object(),t,hn.pick(dt,rt))).Array,_e=t.Date,Se=t.Error,Oe=t.Function,ke=t.Math,je=t.Object,Ee=t.RegExp,Pe=t.String,Ce=t.TypeError,Te=ie.prototype,Ae=Oe.prototype,Me=je.prototype,Ne=t["__core-js_shared__"],De=Ae.toString,Ie=Me.hasOwnProperty,Re=0,Le=(h=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",ze=Me.toString,Be=De.call(je),Fe=dt._,We=Ee("^"+De.call(Ie).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ve=mt?t.Buffer:n,$e=t.Symbol,Ue=t.Uint8Array,Ke=Ve?Ve.allocUnsafe:n,qe=sn(je.getPrototypeOf,je),He=je.create,Ye=Me.propertyIsEnumerable,Xe=Te.splice,Ge=$e?$e.isConcatSpreadable:n,Qe=$e?$e.iterator:n,tt=$e?$e.toStringTag:n,st=function(){try{var e=ui(je,"defineProperty");return e({},"",{}),e}catch{}}(),ut=t.clearTimeout!==dt.clearTimeout&&t.clearTimeout,ft=_e&&_e.now!==dt.Date.now&&_e.now,pt=t.setTimeout!==dt.setTimeout&&t.setTimeout,ht=ke.ceil,yt=ke.floor,gt=je.getOwnPropertySymbols,Lt=Ve?Ve.isBuffer:n,Kt=t.isFinite,mn=Te.join,yn=sn(je.keys,je),gn=ke.max,vn=ke.min,bn=_e.now,xn=t.parseInt,wn=ke.random,_n=Te.reverse,Sn=ui(t,"DataView"),On=ui(t,"Map"),kn=ui(t,"Promise"),jn=ui(t,"Set"),En=ui(t,"WeakMap"),Pn=ui(je,"create"),Cn=En&&new En,Tn={},An=zi(Sn),Mn=zi(On),Nn=zi(kn),Dn=zi(jn),In=zi(En),Rn=$e?$e.prototype:n,Ln=Rn?Rn.valueOf:n,zn=Rn?Rn.toString:n;function Bn(e){if(ts(e)&&!Ua(e)&&!(e instanceof $n)){if(e instanceof Vn)return e;if(Ie.call(e,"__wrapped__"))return Bi(e)}return new Vn(e)}var Fn=function(){function e(){}return function(t){if(!es(t))return{};if(He)return He(t);e.prototype=t;var r=new e;return e.prototype=n,r}}();function Wn(){}function Vn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=n}function $n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=f,this.__views__=[]}function Un(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Kn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Hn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Yn(e){var t=this.__data__=new Kn(e);this.size=t.size}function Xn(e,t){var n=Ua(e),r=!n&&$a(e),o=!n&&!r&&Ya(e),i=!n&&!r&&!o&&cs(e),a=n||r||o||i,s=a?Yt(e.length,Pe):[],l=s.length;for(var c in e)(t||Ie.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||gi(c,l)))&&s.push(c);return s}function Gn(e){var t=e.length;return t?e[qr(0,t-1)]:n}function Zn(e,t){return Ni(Po(e),ar(t,0,e.length))}function Jn(e){return Ni(Po(e))}function Qn(e,t,r){(r!==n&&!Fa(e[t],r)||r===n&&!(t in e))&&or(e,t,r)}function er(e,t,r){var o=e[t];(!Ie.call(e,t)||!Fa(o,r)||r===n&&!(t in e))&&or(e,t,r)}function tr(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&Co(t,As(t),e)}function or(e,t,n){"__proto__"==t&&st?st(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var r=-1,o=t.length,i=ie(o),a=null==e;++r<o;)i[r]=a?n:js(e,t[r]);return i}function ar(e,t,r){return e==e&&(r!==n&&(e=e<=r?e:r),t!==n&&(e=e>=t?e:t)),e}function sr(e,t,r,o,i,a){var s,l=1&t,c=2&t,u=4&t;if(r&&(s=i?r(e,o,i,a):r(e)),s!==n)return s;if(!es(e))return e;var f=Ua(e);if(f){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ie.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return Po(e,s)}else{var d=pi(e),p=d==w||d==_;if(Ya(e))return _o(e,l);if(d==k||d==y||p&&!i){if(s=c||p?{}:mi(e),!l)return c?function(e,t){return Co(e,di(e),t)}(e,function(e,t){return e&&Co(t,Ms(t),e)}(s,e)):function(e,t){return Co(e,fi(e),t)}(e,rr(s,e))}else{if(!at[d])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case M:return So(e);case v:case b:return new r(+e);case N:return function(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case D:case I:case R:case L:case z:case B:case F:case W:case V:return Oo(e,n);case S:return new r;case O:case C:return new r(e);case E:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new r;case T:return function(e){return Ln?je(Ln.call(e)):{}}(e)}}(e,d,l)}}a||(a=new Yn);var h=a.get(e);if(h)return h;a.set(e,s),as(e)?e.forEach((function(n){s.add(sr(n,t,r,n,e,a))})):ns(e)&&e.forEach((function(n,o){s.set(o,sr(n,t,r,o,e,a))}));var m=f?n:(u?c?ri:ni:c?Ms:As)(e);return jt(m||e,(function(n,o){m&&(n=e[o=n]),er(s,o,sr(n,t,r,o,e,a))})),s}function lr(e,t,r){var o=r.length;if(null==e)return!o;for(e=je(e);o--;){var i=r[o],a=t[i],s=e[i];if(s===n&&!(i in e)||!a(s))return!1}return!0}function cr(e,t,o){if("function"!=typeof e)throw new Ce(r);return Ci((function(){e.apply(n,o)}),t)}function ur(e,t,n,r){var o=-1,i=Tt,a=!0,s=e.length,l=[],c=t.length;if(!s)return l;n&&(t=Mt(t,Gt(n))),r?(i=At,a=!1):t.length>=200&&(i=Jt,a=!1,t=new Hn(t));e:for(;++o<s;){var u=e[o],f=null==n?u:n(u);if(u=r||0!==u?u:0,a&&f==f){for(var d=c;d--;)if(t[d]===f)continue e;l.push(u)}else i(t,f,r)||l.push(u)}return l}Bn.templateSettings={escape:G,evaluate:Z,interpolate:J,variable:"",imports:{_:Bn}},Bn.prototype=Wn.prototype,Bn.prototype.constructor=Bn,Vn.prototype=Fn(Wn.prototype),Vn.prototype.constructor=Vn,$n.prototype=Fn(Wn.prototype),$n.prototype.constructor=$n,Un.prototype.clear=function(){this.__data__=Pn?Pn(null):{},this.size=0},Un.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Un.prototype.get=function(e){var t=this.__data__;if(Pn){var r=t[e];return r===o?n:r}return Ie.call(t,e)?t[e]:n},Un.prototype.has=function(e){var t=this.__data__;return Pn?t[e]!==n:Ie.call(t,e)},Un.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pn&&t===n?o:t,this},Kn.prototype.clear=function(){this.__data__=[],this.size=0},Kn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,0))},Kn.prototype.get=function(e){var t=this.__data__,r=tr(t,e);return r<0?n:t[r][1]},Kn.prototype.has=function(e){return tr(this.__data__,e)>-1},Kn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(On||Kn),string:new Un}},qn.prototype.delete=function(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return li(this,e).get(e)},qn.prototype.has=function(e){return li(this,e).has(e)},qn.prototype.set=function(e,t){var n=li(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Hn.prototype.add=Hn.prototype.push=function(e){return this.__data__.set(e,o),this},Hn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.clear=function(){this.__data__=new Kn,this.size=0},Yn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Yn.prototype.get=function(e){return this.__data__.get(e)},Yn.prototype.has=function(e){return this.__data__.has(e)},Yn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Kn){var r=n.__data__;if(!On||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Mo(br),dr=Mo(xr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function hr(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(null!=s&&(l===n?s==s&&!ls(s):r(s,l)))var l=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function yr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=yi),o||(o=[]);++i<a;){var s=e[i];t>0&&n(s)?t>1?yr(s,t-1,n,r,o):Nt(o,s):r||(o[o.length]=s)}return o}var gr=No(),vr=No(!0);function br(e,t){return e&&gr(e,t,As)}function xr(e,t){return e&&vr(e,t,As)}function wr(e,t){return Ct(t,(function(t){return Za(e[t])}))}function _r(e,t){for(var r=0,o=(t=vo(t,e)).length;null!=e&&r<o;)e=e[Li(t[r++])];return r&&r==o?e:n}function Sr(e,t,n){var r=t(e);return Ua(e)?r:Nt(r,n(e))}function Or(e){return null==e?e===n?"[object Undefined]":"[object Null]":tt&&tt in je(e)?function(e){var t=Ie.call(e,tt),r=e[tt];try{e[tt]=n;var o=!0}catch{}var i=ze.call(e);return o&&(t?e[tt]=r:delete e[tt]),i}(e):function(e){return ze.call(e)}(e)}function kr(e,t){return e>t}function jr(e,t){return null!=e&&Ie.call(e,t)}function Er(e,t){return null!=e&&t in je(e)}function Pr(e,t,r){for(var o=r?At:Tt,i=e[0].length,a=e.length,s=a,l=ie(a),c=1/0,u=[];s--;){var f=e[s];s&&t&&(f=Mt(f,Gt(t))),c=vn(f.length,c),l[s]=!r&&(t||i>=120&&f.length>=120)?new Hn(s&&f):n}f=e[0];var d=-1,p=l[0];e:for(;++d<i&&u.length<c;){var h=f[d],m=t?t(h):h;if(h=r||0!==h?h:0,!(p?Jt(p,m):o(u,m,r))){for(s=a;--s;){var y=l[s];if(!(y?Jt(y,m):o(e[s],m,r)))continue e}p&&p.push(m),u.push(h)}}return u}function Cr(e,t,r){var o=null==(e=ji(e,t=vo(t,e)))?e:e[Li(Gi(t))];return null==o?n:Ot(o,e,r)}function Tr(e){return ts(e)&&Or(e)==y}function Ar(e,t,r,o,i){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!=e&&t!=t:function(e,t,r,o,i,a){var s=Ua(e),l=Ua(t),c=s?g:pi(e),u=l?g:pi(t),f=(c=c==y?k:c)==k,d=(u=u==y?k:u)==k,p=c==u;if(p&&Ya(e)){if(!Ya(t))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new Yn),s||cs(e)?ei(e,t,r,o,i,a):function(e,t,n,r,o,i,a){switch(n){case N:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M:return!(e.byteLength!=t.byteLength||!i(new Ue(e),new Ue(t)));case v:case b:case O:return Fa(+e,+t);case x:return e.name==t.name&&e.message==t.message;case E:case C:return e==t+"";case S:var s=an;case P:var l=1&r;if(s||(s=cn),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=ei(s(e),s(t),r,o,i,a);return a.delete(e),u;case T:if(Ln)return Ln.call(e)==Ln.call(t)}return!1}(e,t,c,r,o,i,a);if(!(1&r)){var h=f&&Ie.call(e,"__wrapped__"),m=d&&Ie.call(t,"__wrapped__");if(h||m){var w=h?e.value():e,_=m?t.value():t;return a||(a=new Yn),i(w,_,r,o,a)}}return!!p&&(a||(a=new Yn),function(e,t,r,o,i,a){var s=1&r,l=ni(e),c=l.length;if(c!=ni(t).length&&!s)return!1;for(var u=c;u--;){var f=l[u];if(!(s?f in t:Ie.call(t,f)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var h=!0;a.set(e,t),a.set(t,e);for(var m=s;++u<c;){var y=e[f=l[u]],g=t[f];if(o)var v=s?o(g,y,f,t,e,a):o(y,g,f,e,t,a);if(!(v===n?y===g||i(y,g,r,o,a):v)){h=!1;break}m||(m="constructor"==f)}if(h&&!m){var b=e.constructor,x=t.constructor;b!=x&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(h=!1)}return a.delete(e),a.delete(t),h}(e,t,r,o,i,a))}(e,t,r,o,Ar,i))}function Mr(e,t,r,o){var i=r.length,a=i,s=!o;if(null==e)return!a;for(e=je(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var c=(l=r[i])[0],u=e[c],f=l[1];if(s&&l[2]){if(u===n&&!(c in e))return!1}else{var d=new Yn;if(o)var p=o(u,f,c,e,t,d);if(!(p===n?Ar(f,u,3,o,d):p))return!1}}return!0}function Nr(e){return!(!es(e)||function(e){return!!Le&&Le in e}(e))&&(Za(e)?We:ye).test(zi(e))}function Dr(e){return"function"==typeof e?e:null==e?rl:"object"==typeof e?Ua(e)?Br(e[0],e[1]):zr(e):dl(e)}function Ir(e){if(!_i(e))return yn(e);var t=[];for(var n in je(e))Ie.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Rr(e,t){return e<t}function Lr(e,t){var n=-1,r=qa(e)?ie(e.length):[];return fr(e,(function(e,o,i){r[++n]=t(e,o,i)})),r}function zr(e){var t=ci(e);return 1==t.length&&t[0][2]?Oi(t[0][0],t[0][1]):function(n){return n===e||Mr(n,e,t)}}function Br(e,t){return bi(e)&&Si(t)?Oi(Li(e),t):function(r){var o=js(r,e);return o===n&&o===t?Es(r,e):Ar(t,o,3)}}function Fr(e,t,r,o,i){e!==t&&gr(t,(function(a,s){if(i||(i=new Yn),es(a))!function(e,t,r,o,i,a,s){var l=Ei(e,r),c=Ei(t,r),u=s.get(c);if(u)Qn(e,r,u);else{var f=a?a(l,c,r+"",e,t,s):n,d=f===n;if(d){var p=Ua(c),h=!p&&Ya(c),m=!p&&!h&&cs(c);f=c,p||h||m?Ua(l)?f=l:Ha(l)?f=Po(l):h?(d=!1,f=_o(c,!0)):m?(d=!1,f=Oo(c,!0)):f=[]:os(c)||$a(c)?(f=l,$a(l)?f=gs(l):(!es(l)||Za(l))&&(f=mi(c))):d=!1}d&&(s.set(c,f),i(f,c,o,a,s),s.delete(c)),Qn(e,r,f)}}(e,t,s,r,Fr,o,i);else{var l=o?o(Ei(e,s),a,s+"",e,t,i):n;l===n&&(l=a),Qn(e,s,l)}}),Ms)}function Wr(e,t){var r=e.length;if(r)return gi(t+=t<0?r:0,r)?e[t]:n}function Vr(e,t,n){t=t.length?Mt(t,(function(e){return Ua(e)?function(t){return _r(t,1===e.length?e[0]:e)}:e})):[rl];var r=-1;return t=Mt(t,Gt(si())),function(e){var t=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=ko(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));t--;)e[t]=e[t].value;return e}(Lr(e,(function(e,n,o){return{criteria:Mt(t,(function(t){return t(e)})),index:++r,value:e}})))}function $r(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],s=_r(e,a);n(s,a)&&Zr(i,vo(a,e),s)}return i}function Ur(e,t,n,r){var o=r?Wt:Ft,i=-1,a=t.length,s=e;for(e===t&&(t=Po(t)),n&&(s=Mt(e,Gt(n)));++i<a;)for(var l=0,c=t[i],u=n?n(c):c;(l=o(s,u,l,r))>-1;)s!==e&&Xe.call(s,l,1),Xe.call(e,l,1);return e}function Kr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;gi(o)?Xe.call(e,o,1):co(e,o)}}return e}function qr(e,t){return e+yt(wn()*(t-e+1))}function Hr(e,t){var n="";if(!e||t<1||t>c)return n;do{t%2&&(n+=e),(t=yt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Ti(ki(e,t,rl),e+"")}function Xr(e){return Gn(Fs(e))}function Gr(e,t){var n=Fs(e);return Ni(n,ar(t,0,n.length))}function Zr(e,t,r,o){if(!es(e))return e;for(var i=-1,a=(t=vo(t,e)).length,s=a-1,l=e;null!=l&&++i<a;){var c=Li(t[i]),u=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var f=l[c];(u=o?o(f,c,l):n)===n&&(u=es(f)?f:gi(t[i+1])?[]:{})}er(l,c,u),l=l[c]}return e}var Jr=Cn?function(e,t){return Cn.set(e,t),e}:rl,Qr=st?function(e,t){return st(e,"toString",{configurable:!0,enumerable:!1,value:el(t),writable:!0})}:rl;function eo(e){return Ni(Fs(e))}function to(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=ie(o);++r<o;)i[r]=e[r+t];return i}function no(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ro(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=p){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!ls(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return oo(e,t,rl,n)}function oo(e,t,r,o){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,l=null===t,c=ls(t),u=t===n;i<a;){var f=yt((i+a)/2),p=r(e[f]),h=p!==n,m=null===p,y=p==p,g=ls(p);if(s)var v=o||y;else v=u?y&&(o||h):l?y&&h&&(o||!m):c?y&&h&&!m&&(o||!g):!m&&!g&&(o?p<=t:p<t);v?i=f+1:a=f}return vn(a,d)}function io(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Fa(s,l)){var l=s;i[o++]=0===a?0:a}}return i}function ao(e){return"number"==typeof e?e:ls(e)?u:+e}function so(e){if("string"==typeof e)return e;if(Ua(e))return Mt(e,so)+"";if(ls(e))return zn?zn.call(e):"";var t=e+"";return"0"==t&&1/e==-l?"-0":t}function lo(e,t,n){var r=-1,o=Tt,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=At;else if(i>=200){var c=t?null:Yo(e);if(c)return cn(c);a=!1,o=Jt,l=new Hn}else l=t?[]:s;e:for(;++r<i;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,a&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else o(l,f,n)||(l!==s&&l.push(f),s.push(u))}return s}function co(e,t){return null==(e=ji(e,t=vo(t,e)))||delete e[Li(Gi(t))]}function uo(e,t,n,r){return Zr(e,t,n(_r(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?to(e,r?0:i,r?i+1:o):to(e,r?i+1:0,r?o:i)}function po(e,t){var n=e;return n instanceof $n&&(n=n.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Nt([e],t.args))}),n)}function ho(e,t,n){var r=e.length;if(r<2)return r?lo(e[0]):[];for(var o=-1,i=ie(r);++o<r;)for(var a=e[o],s=-1;++s<r;)s!=o&&(i[o]=ur(i[o]||a,e[s],t,n));return lo(yr(i,1),t,n)}function mo(e,t,r){for(var o=-1,i=e.length,a=t.length,s={};++o<i;){var l=o<a?t[o]:n;r(s,e[o],l)}return s}function yo(e){return Ha(e)?e:[]}function go(e){return"function"==typeof e?e:rl}function vo(e,t){return Ua(e)?e:bi(e,t)?[e]:Ri(vs(e))}var bo=Yr;function xo(e,t,r){var o=e.length;return r=r===n?o:r,!t&&r>=o?e:to(e,t,r)}var wo=ut||function(e){return dt.clearTimeout(e)};function _o(e,t){if(t)return e.slice();var n=e.length,r=Ke?Ke(n):new e.constructor(n);return e.copy(r),r}function So(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Oo(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function ko(e,t){if(e!==t){var r=e!==n,o=null===e,i=e==e,a=ls(e),s=t!==n,l=null===t,c=t==t,u=ls(t);if(!l&&!u&&!a&&e>t||a&&s&&c&&!l&&!u||o&&s&&c||!r&&c||!i)return 1;if(!o&&!a&&!u&&e<t||u&&r&&i&&!o&&!a||l&&r&&i||!s&&i||!c)return-1}return 0}function jo(e,t,n,r){for(var o=-1,i=e.length,a=n.length,s=-1,l=t.length,c=gn(i-a,0),u=ie(l+c),f=!r;++s<l;)u[s]=t[s];for(;++o<a;)(f||o<i)&&(u[n[o]]=e[o]);for(;c--;)u[s++]=e[o++];return u}function Eo(e,t,n,r){for(var o=-1,i=e.length,a=-1,s=n.length,l=-1,c=t.length,u=gn(i-s,0),f=ie(u+c),d=!r;++o<u;)f[o]=e[o];for(var p=o;++l<c;)f[p+l]=t[l];for(;++a<s;)(d||o<i)&&(f[p+n[a]]=e[o++]);return f}function Po(e,t){var n=-1,r=e.length;for(t||(t=ie(r));++n<r;)t[n]=e[n];return t}function Co(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],c=o?o(r[l],e[l],l,r,e):n;c===n&&(c=e[l]),i?or(r,l,c):er(r,l,c)}return r}function To(e,t){return function(n,r){var o=Ua(n)?kt:nr,i=t?t():{};return o(n,e,si(r,2),i)}}function Ao(e){return Yr((function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:n,s=i>2?r[2]:n;for(a=e.length>3&&"function"==typeof a?(i--,a):n,s&&vi(r[0],r[1],s)&&(a=i<3?n:a,i=1),t=je(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t}))}function Mo(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=je(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function No(e){return function(t,n,r){for(var o=-1,i=je(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}function Do(e){return function(t){var r=on(t=vs(t))?fn(t):n,o=r?r[0]:t.charAt(0),i=r?xo(r,1).join(""):t.slice(1);return o[e]()+i}}function Io(e){return function(t){return Dt(Zs($s(t).replace(Ze,"")),e,"")}}function Ro(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Fn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Lo(e){return function(t,r,o){var i=je(t);if(!qa(t)){var a=si(r,3);t=As(t),r=function(e){return a(i[e],e,i)}}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:n}}function zo(e){return ti((function(t){var o=t.length,i=o,a=Vn.prototype.thru;for(e&&t.reverse();i--;){var s=t[i];if("function"!=typeof s)throw new Ce(r);if(a&&!l&&"wrapper"==ii(s))var l=new Vn([],!0)}for(i=l?i:o;++i<o;){var c=ii(s=t[i]),u="wrapper"==c?oi(s):n;l=u&&xi(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[ii(u[0])].apply(l,u[3]):1==s.length&&xi(s)?l[c]():l.thru(s)}return function(){var e=arguments,n=e[0];if(l&&1==e.length&&Ua(n))return l.plant(n).value();for(var r=0,i=o?t[r].apply(this,e):n;++r<o;)i=t[r].call(this,i);return i}}))}function Bo(e,t,r,o,i,a,l,c,u,f){var d=t&s,p=1&t,h=2&t,m=24&t,y=512&t,g=h?n:Ro(e);return function s(){for(var v=arguments.length,b=ie(v),x=v;x--;)b[x]=arguments[x];if(m)var w=ai(s),_=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(b,w);if(o&&(b=jo(b,o,i,m)),a&&(b=Eo(b,a,l,m)),v-=_,m&&v<f){var S=ln(b,w);return qo(e,t,Bo,s.placeholder,r,b,S,c,u,f-v)}var O=p?r:this,k=h?O[e]:e;return v=b.length,c?b=function(e,t){for(var r=e.length,o=vn(t.length,r),i=Po(e);o--;){var a=t[o];e[o]=gi(a,r)?i[a]:n}return e}(b,c):y&&v>1&&b.reverse(),d&&u<v&&(b.length=u),this&&this!==dt&&this instanceof s&&(k=g||Ro(k)),k.apply(O,b)}}function Fo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Wo(e,t){return function(r,o){var i;if(r===n&&o===n)return t;if(r!==n&&(i=r),o!==n){if(i===n)return o;"string"==typeof r||"string"==typeof o?(r=so(r),o=so(o)):(r=ao(r),o=ao(o)),i=e(r,o)}return i}}function Vo(e){return ti((function(t){return t=Mt(t,Gt(si())),Yr((function(n){var r=this;return e(t,(function(e){return Ot(e,r,n)}))}))}))}function $o(e,t){var r=(t=t===n?" ":so(t)).length;if(r<2)return r?Hr(t,e):t;var o=Hr(t,ht(e/un(t)));return on(t)?xo(fn(o),0,e).join(""):o.slice(0,e)}function Uo(e){return function(t,r,o){return o&&"number"!=typeof o&&vi(t,r,o)&&(r=o=n),t=ps(t),r===n?(r=t,t=0):r=ps(r),function(e,t,n,r){for(var o=-1,i=gn(ht((t-e)/(n||1)),0),a=ie(i);i--;)a[r?i:++o]=e,e+=n;return a}(t,r,o=o===n?t<r?1:-1:ps(o),e)}}function Ko(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ys(t),n=ys(n)),e(t,n)}}function qo(e,t,r,o,i,s,l,c,u,f){var d=8&t;t|=d?a:64,4&(t&=~(d?64:a))||(t&=-4);var p=[e,t,i,d?s:n,d?l:n,d?n:s,d?n:l,c,u,f],h=r.apply(n,p);return xi(e)&&Pi(h,p),h.placeholder=o,Ai(h,e,t)}function Ho(e){var t=ke[e];return function(e,n){if(e=ys(e),(n=null==n?0:vn(hs(n),292))&&Kt(e)){var r=(vs(e)+"e").split("e");return+((r=(vs(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Yo=jn&&1/cn(new jn([,-0]))[1]==l?function(e){return new jn(e)}:ll;function Xo(e){return function(t){var n=pi(t);return n==S?an(t):n==P?function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}(t):function(e,t){return Mt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Go(e,t,o,l,c,u,f,d){var p=2&t;if(!p&&"function"!=typeof e)throw new Ce(r);var h=l?l.length:0;if(h||(t&=-97,l=c=n),f=f===n?f:gn(hs(f),0),d=d===n?d:hs(d),h-=c?c.length:0,64&t){var m=l,y=c;l=c=n}var g=p?n:oi(e),v=[e,t,o,l,c,m,y,u,f,d];if(g&&function(e,t){var n=e[1],r=t[1],o=n|r,a=o<131,l=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!a&&!l)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?jo(u,c,t[4]):c,e[4]=u?ln(e[3],i):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Eo(u,c,t[6]):c,e[6]=u?ln(e[5],i):t[6]),(c=t[7])&&(e[7]=c),r&s&&(e[8]=null==e[8]?t[8]:vn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(v,g),e=v[0],t=v[1],o=v[2],l=v[3],c=v[4],!(d=v[9]=v[9]===n?p?0:e.length:gn(v[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)b=8==t||16==t?function(e,t,r){var o=Ro(e);return function i(){for(var a=arguments.length,s=ie(a),l=a,c=ai(i);l--;)s[l]=arguments[l];var u=a<3&&s[0]!==c&&s[a-1]!==c?[]:ln(s,c);return(a-=u.length)<r?qo(e,t,Bo,i.placeholder,n,s,u,n,n,r-a):Ot(this&&this!==dt&&this instanceof i?o:e,this,s)}}(e,t,d):t!=a&&33!=t||c.length?Bo.apply(n,v):function(e,t,n,r){var o=1&t,i=Ro(e);return function t(){for(var a=-1,s=arguments.length,l=-1,c=r.length,u=ie(c+s),f=this&&this!==dt&&this instanceof t?i:e;++l<c;)u[l]=r[l];for(;s--;)u[l++]=arguments[++a];return Ot(f,o?n:this,u)}}(e,t,o,l);else var b=function(e,t,n){var r=1&t,o=Ro(e);return function t(){return(this&&this!==dt&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,o);return Ai((g?Jr:Pi)(b,v),e,t)}function Zo(e,t,r,o){return e===n||Fa(e,Me[r])&&!Ie.call(o,r)?t:e}function Jo(e,t,r,o,i,a){return es(e)&&es(t)&&(a.set(t,e),Fr(e,t,n,Jo,a),a.delete(t)),e}function Qo(e){return os(e)?n:e}function ei(e,t,r,o,i,a){var s=1&r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=a.get(e),f=a.get(t);if(u&&f)return u==t&&f==e;var d=-1,p=!0,h=2&r?new Hn:n;for(a.set(e,t),a.set(t,e);++d<l;){var m=e[d],y=t[d];if(o)var g=s?o(y,m,d,t,e,a):o(m,y,d,e,t,a);if(g!==n){if(g)continue;p=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(m===e||i(m,e,r,o,a)))return h.push(t)}))){p=!1;break}}else if(m!==y&&!i(m,y,r,o,a)){p=!1;break}}return a.delete(e),a.delete(t),p}function ti(e){return Ti(ki(e,n,Ki),e+"")}function ni(e){return Sr(e,As,fi)}function ri(e){return Sr(e,Ms,di)}var oi=Cn?function(e){return Cn.get(e)}:ll;function ii(e){for(var t=e.name+"",n=Tn[t],r=Ie.call(Tn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ai(e){return(Ie.call(Bn,"placeholder")?Bn:e).placeholder}function si(){var e=Bn.iteratee||ol;return e=e===ol?Dr:e,arguments.length?e(arguments[0],arguments[1]):e}function li(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ci(e){for(var t=As(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Si(o)]}return t}function ui(e,t){var r=function(e,t){return null==e?n:e[t]}(e,t);return Nr(r)?r:n}var fi=gt?function(e){return null==e?[]:(e=je(e),Ct(gt(e),(function(t){return Ye.call(e,t)})))}:ml,di=gt?function(e){for(var t=[];e;)Nt(t,fi(e)),e=qe(e);return t}:ml,pi=Or;function hi(e,t,n){for(var r=-1,o=(t=vo(t,e)).length,i=!1;++r<o;){var a=Li(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&Qa(o)&&gi(a,o)&&(Ua(e)||$a(e))}function mi(e){return"function"!=typeof e.constructor||_i(e)?{}:Fn(qe(e))}function yi(e){return Ua(e)||$a(e)||!!(Ge&&e&&e[Ge])}function gi(e,t){var n=typeof e;return!!(t=t??c)&&("number"==n||"symbol"!=n&&ve.test(e))&&e>-1&&e%1==0&&e<t}function vi(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&gi(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function bi(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ls(e))||ee.test(e)||!Q.test(e)||null!=t&&e in je(t)}function xi(e){var t=ii(e),n=Bn[t];if("function"!=typeof n||!(t in $n.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(Sn&&pi(new Sn(new ArrayBuffer(1)))!=N||On&&pi(new On)!=S||kn&&pi(kn.resolve())!=j||jn&&pi(new jn)!=P||En&&pi(new En)!=A)&&(pi=function(e){var t=Or(e),r=t==k?e.constructor:n,o=r?zi(r):"";if(o)switch(o){case An:return N;case Mn:return S;case Nn:return j;case Dn:return P;case In:return A}return t});var wi=Ne?Za:yl;function _i(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Me)}function Si(e){return e==e&&!es(e)}function Oi(e,t){return function(r){return null!=r&&r[e]===t&&(t!==n||e in je(r))}}function ki(e,t,r){return t=gn(t===n?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=gn(n.length-t,0),a=ie(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=ie(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),Ot(e,this,s)}}function ji(e,t){return t.length<2?e:_r(e,to(t,0,-1))}function Ei(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Pi=Mi(Jr),Ci=pt||function(e,t){return dt.setTimeout(e,t)},Ti=Mi(Qr);function Ai(e,t,n){var r=t+"";return Ti(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ae,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return jt(m,(function(n){var r="_."+n[0];t&n[1]&&!Tt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(le):[]}(r),n)))}function Mi(e){var t=0,r=0;return function(){var o=bn(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(n,arguments)}}function Ni(e,t){var r=-1,o=e.length,i=o-1;for(t=t===n?o:t;++r<t;){var a=qr(r,i),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Di,Ii,Ri=(Di=Da((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,(function(e,n,r,o){t.push(r?o.replace(fe,"$1"):n||e)})),t}),(function(e){return 500===Ii.size&&Ii.clear(),e})),Ii=Di.cache,Di);function Li(e){if("string"==typeof e||ls(e))return e;var t=e+"";return"0"==t&&1/e==-l?"-0":t}function zi(e){if(null!=e){try{return De.call(e)}catch{}try{return e+""}catch{}}return""}function Bi(e){if(e instanceof $n)return e.clone();var t=new Vn(e.__wrapped__,e.__chain__);return t.__actions__=Po(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=Yr((function(e,t){return Ha(e)?ur(e,yr(t,1,Ha,!0)):[]})),Wi=Yr((function(e,t){var r=Gi(t);return Ha(r)&&(r=n),Ha(e)?ur(e,yr(t,1,Ha,!0),si(r,2)):[]})),Vi=Yr((function(e,t){var r=Gi(t);return Ha(r)&&(r=n),Ha(e)?ur(e,yr(t,1,Ha,!0),n,r):[]}));function $i(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=gn(r+o,0)),Bt(e,si(t,3),o)}function Ui(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o-1;return r!==n&&(i=hs(r),i=r<0?gn(o+i,0):vn(i,o-1)),Bt(e,si(t,3),i,!0)}function Ki(e){return null!=e&&e.length?yr(e,1):[]}function qi(e){return e&&e.length?e[0]:n}var Hi=Yr((function(e){var t=Mt(e,yo);return t.length&&t[0]===e[0]?Pr(t):[]})),Yi=Yr((function(e){var t=Gi(e),r=Mt(e,yo);return t===Gi(r)?t=n:r.pop(),r.length&&r[0]===e[0]?Pr(r,si(t,2)):[]})),Xi=Yr((function(e){var t=Gi(e),r=Mt(e,yo);return(t="function"==typeof t?t:n)&&r.pop(),r.length&&r[0]===e[0]?Pr(r,n,t):[]}));function Gi(e){var t=null==e?0:e.length;return t?e[t-1]:n}var Zi=Yr(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Ur(e,t):e}var Qi=ti((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Kr(e,Mt(t,(function(e){return gi(e,n)?+e:e})).sort(ko)),r}));function ea(e){return null==e?e:_n.call(e)}var ta=Yr((function(e){return lo(yr(e,1,Ha,!0))})),na=Yr((function(e){var t=Gi(e);return Ha(t)&&(t=n),lo(yr(e,1,Ha,!0),si(t,2))})),ra=Yr((function(e){var t=Gi(e);return t="function"==typeof t?t:n,lo(yr(e,1,Ha,!0),n,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=Ct(e,(function(e){if(Ha(e))return t=gn(e.length,t),!0})),Yt(t,(function(t){return Mt(e,Ut(t))}))}function ia(e,t){if(!e||!e.length)return[];var r=oa(e);return null==t?r:Mt(r,(function(e){return Ot(t,n,e)}))}var aa=Yr((function(e,t){return Ha(e)?ur(e,t):[]})),sa=Yr((function(e){return ho(Ct(e,Ha))})),la=Yr((function(e){var t=Gi(e);return Ha(t)&&(t=n),ho(Ct(e,Ha),si(t,2))})),ca=Yr((function(e){var t=Gi(e);return t="function"==typeof t?t:n,ho(Ct(e,Ha),n,t)})),ua=Yr(oa),fa=Yr((function(e){var t=e.length,r=t>1?e[t-1]:n;return r="function"==typeof r?(e.pop(),r):n,ia(e,r)}));function da(e){var t=Bn(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var ha=ti((function(e){var t=e.length,r=t?e[0]:0,o=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&o instanceof $n&&gi(r)?((o=o.slice(r,+r+(t?1:0))).__actions__.push({func:pa,args:[i],thisArg:n}),new Vn(o,this.__chain__).thru((function(e){return t&&!e.length&&e.push(n),e}))):this.thru(i)})),ma=To((function(e,t,n){Ie.call(e,n)?++e[n]:or(e,n,1)})),ya=Lo($i),ga=Lo(Ui);function va(e,t){return(Ua(e)?jt:fr)(e,si(t,3))}function ba(e,t){return(Ua(e)?Et:dr)(e,si(t,3))}var xa=To((function(e,t,n){Ie.call(e,n)?e[n].push(t):or(e,n,[t])})),wa=Yr((function(e,t,n){var r=-1,o="function"==typeof t,i=qa(e)?ie(e.length):[];return fr(e,(function(e){i[++r]=o?Ot(t,e,n):Cr(e,t,n)})),i})),_a=To((function(e,t,n){or(e,n,t)}));function Sa(e,t){return(Ua(e)?Mt:Lr)(e,si(t,3))}var Oa=To((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),ka=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&vi(e,t[0],t[1])?t=[]:n>2&&vi(t[0],t[1],t[2])&&(t=[t[0]]),Vr(e,yr(t,1),[])})),ja=ft||function(){return dt.Date.now()};function Ea(e,t,r){return t=r?n:t,t=e&&null==t?e.length:t,Go(e,s,n,n,n,n,t)}function Pa(e,t){var o;if("function"!=typeof t)throw new Ce(r);return e=hs(e),function(){return--e>0&&(o=t.apply(this,arguments)),e<=1&&(t=n),o}}var Ca=Yr((function(e,t,n){var r=1;if(n.length){var o=ln(n,ai(Ca));r|=a}return Go(e,r,t,n,o)})),Ta=Yr((function(e,t,n){var r=3;if(n.length){var o=ln(n,ai(Ta));r|=a}return Go(t,r,e,n,o)}));function Aa(e,t,o){var i,a,s,l,c,u,f=0,d=!1,p=!1,h=!0;if("function"!=typeof e)throw new Ce(r);function m(t){var r=i,o=a;return i=a=n,f=t,l=e.apply(o,r)}function y(e){var r=e-u;return u===n||r>=t||r<0||p&&e-f>=s}function g(){var e=ja();if(y(e))return v(e);c=Ci(g,function(e){var n=t-(e-u);return p?vn(n,s-(e-f)):n}(e))}function v(e){return c=n,h&&i?m(e):(i=a=n,l)}function b(){var e=ja(),r=y(e);if(i=arguments,a=this,u=e,r){if(c===n)return function(e){return f=e,c=Ci(g,t),d?m(e):l}(u);if(p)return wo(c),c=Ci(g,t),m(u)}return c===n&&(c=Ci(g,t)),l}return t=ys(t)||0,es(o)&&(d=!!o.leading,s=(p="maxWait"in o)?gn(ys(o.maxWait)||0,t):s,h="trailing"in o?!!o.trailing:h),b.cancel=function(){c!==n&&wo(c),f=0,i=u=a=c=n},b.flush=function(){return c===n?l:v(ja())},b}var Ma=Yr((function(e,t){return cr(e,1,t)})),Na=Yr((function(e,t,n){return cr(e,ys(t)||0,n)}));function Da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(r);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Da.Cache||qn),n}function Ia(e){if("function"!=typeof e)throw new Ce(r);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Da.Cache=qn;var Ra=bo((function(e,t){var n=(t=1==t.length&&Ua(t[0])?Mt(t[0],Gt(si())):Mt(yr(t,1),Gt(si()))).length;return Yr((function(r){for(var o=-1,i=vn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return Ot(e,this,r)}))})),La=Yr((function(e,t){var r=ln(t,ai(La));return Go(e,a,n,t,r)})),za=Yr((function(e,t){var r=ln(t,ai(za));return Go(e,64,n,t,r)})),Ba=ti((function(e,t){return Go(e,256,n,n,n,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var Wa=Ko(kr),Va=Ko((function(e,t){return e>=t})),$a=Tr(function(){return arguments}())?Tr:function(e){return ts(e)&&Ie.call(e,"callee")&&!Ye.call(e,"callee")},Ua=ie.isArray,Ka=vt?Gt(vt):function(e){return ts(e)&&Or(e)==M};function qa(e){return null!=e&&Qa(e.length)&&!Za(e)}function Ha(e){return ts(e)&&qa(e)}var Ya=Lt||yl,Xa=bt?Gt(bt):function(e){return ts(e)&&Or(e)==b};function Ga(e){if(!ts(e))return!1;var t=Or(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Za(e){if(!es(e))return!1;var t=Or(e);return t==w||t==_||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==hs(e)}function Qa(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=xt?Gt(xt):function(e){return ts(e)&&pi(e)==S};function rs(e){return"number"==typeof e||ts(e)&&Or(e)==O}function os(e){if(!ts(e)||Or(e)!=k)return!1;var t=qe(e);if(null===t)return!0;var n=Ie.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&De.call(n)==Be}var is=wt?Gt(wt):function(e){return ts(e)&&Or(e)==E},as=_t?Gt(_t):function(e){return ts(e)&&pi(e)==P};function ss(e){return"string"==typeof e||!Ua(e)&&ts(e)&&Or(e)==C}function ls(e){return"symbol"==typeof e||ts(e)&&Or(e)==T}var cs=St?Gt(St):function(e){return ts(e)&&Qa(e.length)&&!!it[Or(e)]},us=Ko(Rr),fs=Ko((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(qa(e))return ss(e)?fn(e):Po(e);if(Qe&&e[Qe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Qe]());var t=pi(e);return(t==S?an:t==P?cn:Fs)(e)}function ps(e){return e?(e=ys(e))===l||e===-l?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function hs(e){var t=ps(e),n=t%1;return t==t?n?t-n:t:0}function ms(e){return e?ar(hs(e),0,f):0}function ys(e){if("number"==typeof e)return e;if(ls(e))return u;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Xt(e);var n=me.test(e);return n||ge.test(e)?ct(e.slice(2),n?2:8):he.test(e)?u:+e}function gs(e){return Co(e,Ms(e))}function vs(e){return null==e?"":so(e)}var bs=Ao((function(e,t){if(_i(t)||qa(t))Co(t,As(t),e);else for(var n in t)Ie.call(t,n)&&er(e,n,t[n])})),xs=Ao((function(e,t){Co(t,Ms(t),e)})),ws=Ao((function(e,t,n,r){Co(t,Ms(t),e,r)})),_s=Ao((function(e,t,n,r){Co(t,As(t),e,r)})),Ss=ti(ir),Os=Yr((function(e,t){e=je(e);var r=-1,o=t.length,i=o>2?t[2]:n;for(i&&vi(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=Ms(a),l=-1,c=s.length;++l<c;){var u=s[l],f=e[u];(f===n||Fa(f,Me[u])&&!Ie.call(e,u))&&(e[u]=a[u])}return e})),ks=Yr((function(e){return e.push(n,Jo),Ot(Ds,n,e)}));function js(e,t,r){var o=null==e?n:_r(e,t);return o===n?r:o}function Es(e,t){return null!=e&&hi(e,t,Er)}var Ps=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),e[t]=n}),el(rl)),Cs=Fo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=ze.call(t)),Ie.call(e,t)?e[t].push(n):e[t]=[n]}),si),Ts=Yr(Cr);function As(e){return qa(e)?Xn(e):Ir(e)}function Ms(e){return qa(e)?Xn(e,!0):function(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in je(e))t.push(n);return t}(e);var t=_i(e),n=[];for(var r in e)"constructor"==r&&(t||!Ie.call(e,r))||n.push(r);return n}(e)}var Ns=Ao((function(e,t,n){Fr(e,t,n)})),Ds=Ao((function(e,t,n,r){Fr(e,t,n,r)})),Is=ti((function(e,t){var n={};if(null==e)return n;var r=!1;t=Mt(t,(function(t){return t=vo(t,e),r||(r=t.length>1),t})),Co(e,ri(e),n),r&&(n=sr(n,7,Qo));for(var o=t.length;o--;)co(n,t[o]);return n})),Rs=ti((function(e,t){return null==e?{}:function(e,t){return $r(e,t,(function(t,n){return Es(e,n)}))}(e,t)}));function Ls(e,t){if(null==e)return{};var n=Mt(ri(e),(function(e){return[e]}));return t=si(t),$r(e,n,(function(e,n){return t(e,n[0])}))}var zs=Xo(As),Bs=Xo(Ms);function Fs(e){return null==e?[]:Zt(e,As(e))}var Ws=Io((function(e,t,n){return t=t.toLowerCase(),e+(n?Vs(t):t)}));function Vs(e){return Gs(vs(e).toLowerCase())}function $s(e){return(e=vs(e))&&e.replace(be,tn).replace(Je,"")}var Us=Io((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ks=Io((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Do("toLowerCase"),Hs=Io((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Ys=Io((function(e,t,n){return e+(n?" ":"")+Gs(t)})),Xs=Io((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Gs=Do("toUpperCase");function Zs(e,t,r){return e=vs(e),(t=r?n:t)===n?function(e){return nt.test(e)}(e)?function(e){return e.match(et)||[]}(e):function(e){return e.match(ce)||[]}(e):e.match(t)||[]}var Js=Yr((function(e,t){try{return Ot(e,n,t)}catch(e){return Ga(e)?e:new Se(e)}})),Qs=ti((function(e,t){return jt(t,(function(t){t=Li(t),or(e,t,Ca(e[t],e))})),e}));function el(e){return function(){return e}}var tl=zo(),nl=zo(!0);function rl(e){return e}function ol(e){return Dr("function"==typeof e?e:sr(e,1))}var il=Yr((function(e,t){return function(n){return Cr(n,e,t)}})),al=Yr((function(e,t){return function(n){return Cr(e,n,t)}}));function sl(e,t,n){var r=As(t),o=wr(t,r);null==n&&(!es(t)||!o.length&&r.length)&&(n=t,t=e,e=this,o=wr(t,As(t)));var i=!(es(n)&&"chain"in n&&!n.chain),a=Za(e);return jt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__);return(n.__actions__=Po(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Nt([this.value()],arguments))})})),e}function ll(){}var cl=Vo(Mt),ul=Vo(Pt),fl=Vo(Rt);function dl(e){return bi(e)?Ut(Li(e)):function(e){return function(t){return _r(t,e)}}(e)}var pl=Uo(),hl=Uo(!0);function ml(){return[]}function yl(){return!1}var gl=Wo((function(e,t){return e+t}),0),vl=Ho("ceil"),bl=Wo((function(e,t){return e/t}),1),xl=Ho("floor"),wl=Wo((function(e,t){return e*t}),1),_l=Ho("round"),Sl=Wo((function(e,t){return e-t}),0);return Bn.after=function(e,t){if("function"!=typeof t)throw new Ce(r);return e=hs(e),function(){if(--e<1)return t.apply(this,arguments)}},Bn.ary=Ea,Bn.assign=bs,Bn.assignIn=xs,Bn.assignInWith=ws,Bn.assignWith=_s,Bn.at=Ss,Bn.before=Pa,Bn.bind=Ca,Bn.bindAll=Qs,Bn.bindKey=Ta,Bn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Bn.chain=da,Bn.chunk=function(e,t,r){t=(r?vi(e,t,r):t===n)?1:gn(hs(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var i=0,a=0,s=ie(ht(o/t));i<o;)s[a++]=to(e,i,i+=t);return s},Bn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},Bn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=ie(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Nt(Ua(n)?Po(n):[n],yr(t,1))},Bn.cond=function(e){var t=null==e?0:e.length,n=si();return e=t?Mt(e,(function(e){if("function"!=typeof e[1])throw new Ce(r);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var o=e[r];if(Ot(o[0],this,n))return Ot(o[1],this,n)}}))},Bn.conforms=function(e){return function(e){var t=As(e);return function(n){return lr(n,e,t)}}(sr(e,1))},Bn.constant=el,Bn.countBy=ma,Bn.create=function(e,t){var n=Fn(e);return null==t?n:rr(n,t)},Bn.curry=function e(t,r,o){var i=Go(t,8,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Bn.curryRight=function e(t,r,o){var i=Go(t,16,n,n,n,n,n,r=o?n:r);return i.placeholder=e.placeholder,i},Bn.debounce=Aa,Bn.defaults=Os,Bn.defaultsDeep=ks,Bn.defer=Ma,Bn.delay=Na,Bn.difference=Fi,Bn.differenceBy=Wi,Bn.differenceWith=Vi,Bn.drop=function(e,t,r){var o=null==e?0:e.length;return o?to(e,(t=r||t===n?1:hs(t))<0?0:t,o):[]},Bn.dropRight=function(e,t,r){var o=null==e?0:e.length;return o?to(e,0,(t=o-(t=r||t===n?1:hs(t)))<0?0:t):[]},Bn.dropRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0,!0):[]},Bn.dropWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!0):[]},Bn.fill=function(e,t,r,o){var i=null==e?0:e.length;return i?(r&&"number"!=typeof r&&vi(e,t,r)&&(r=0,o=i),function(e,t,r,o){var i=e.length;for((r=hs(r))<0&&(r=-r>i?0:i+r),(o=o===n||o>i?i:hs(o))<0&&(o+=i),o=r>o?0:ms(o);r<o;)e[r++]=t;return e}(e,t,r,o)):[]},Bn.filter=function(e,t){return(Ua(e)?Ct:mr)(e,si(t,3))},Bn.flatMap=function(e,t){return yr(Sa(e,t),1)},Bn.flatMapDeep=function(e,t){return yr(Sa(e,t),l)},Bn.flatMapDepth=function(e,t,r){return r=r===n?1:hs(r),yr(Sa(e,t),r)},Bn.flatten=Ki,Bn.flattenDeep=function(e){return null!=e&&e.length?yr(e,l):[]},Bn.flattenDepth=function(e,t){return null!=e&&e.length?yr(e,t=t===n?1:hs(t)):[]},Bn.flip=function(e){return Go(e,512)},Bn.flow=tl,Bn.flowRight=nl,Bn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},Bn.functions=function(e){return null==e?[]:wr(e,As(e))},Bn.functionsIn=function(e){return null==e?[]:wr(e,Ms(e))},Bn.groupBy=xa,Bn.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},Bn.intersection=Hi,Bn.intersectionBy=Yi,Bn.intersectionWith=Xi,Bn.invert=Ps,Bn.invertBy=Cs,Bn.invokeMap=wa,Bn.iteratee=ol,Bn.keyBy=_a,Bn.keys=As,Bn.keysIn=Ms,Bn.map=Sa,Bn.mapKeys=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},Bn.mapValues=function(e,t){var n={};return t=si(t,3),br(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},Bn.matches=function(e){return zr(sr(e,1))},Bn.matchesProperty=function(e,t){return Br(e,sr(t,1))},Bn.memoize=Da,Bn.merge=Ns,Bn.mergeWith=Ds,Bn.method=il,Bn.methodOf=al,Bn.mixin=sl,Bn.negate=Ia,Bn.nthArg=function(e){return e=hs(e),Yr((function(t){return Wr(t,e)}))},Bn.omit=Is,Bn.omitBy=function(e,t){return Ls(e,Ia(si(t)))},Bn.once=function(e){return Pa(2,e)},Bn.orderBy=function(e,t,r,o){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(r=o?n:r)||(r=null==r?[]:[r]),Vr(e,t,r))},Bn.over=cl,Bn.overArgs=Ra,Bn.overEvery=ul,Bn.overSome=fl,Bn.partial=La,Bn.partialRight=za,Bn.partition=Oa,Bn.pick=Rs,Bn.pickBy=Ls,Bn.property=dl,Bn.propertyOf=function(e){return function(t){return null==e?n:_r(e,t)}},Bn.pull=Zi,Bn.pullAll=Ji,Bn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Ur(e,t,si(n,2)):e},Bn.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Ur(e,t,n,r):e},Bn.pullAt=Qi,Bn.range=pl,Bn.rangeRight=hl,Bn.rearg=Ba,Bn.reject=function(e,t){return(Ua(e)?Ct:mr)(e,Ia(si(t,3)))},Bn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=si(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Kr(e,o),n},Bn.rest=function(e,t){if("function"!=typeof e)throw new Ce(r);return Yr(e,t=t===n?t:hs(t))},Bn.reverse=ea,Bn.sampleSize=function(e,t,r){return t=(r?vi(e,t,r):t===n)?1:hs(t),(Ua(e)?Zn:Gr)(e,t)},Bn.set=function(e,t,n){return null==e?e:Zr(e,t,n)},Bn.setWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:Zr(e,t,r,o)},Bn.shuffle=function(e){return(Ua(e)?Jn:eo)(e)},Bn.slice=function(e,t,r){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&vi(e,t,r)?(t=0,r=o):(t=null==t?0:hs(t),r=r===n?o:hs(r)),to(e,t,r)):[]},Bn.sortBy=ka,Bn.sortedUniq=function(e){return e&&e.length?io(e):[]},Bn.sortedUniqBy=function(e,t){return e&&e.length?io(e,si(t,2)):[]},Bn.split=function(e,t,r){return r&&"number"!=typeof r&&vi(e,t,r)&&(t=r=n),(r=r===n?f:r>>>0)?(e=vs(e))&&("string"==typeof t||null!=t&&!is(t))&&!(t=so(t))&&on(e)?xo(fn(e),0,r):e.split(t,r):[]},Bn.spread=function(e,t){if("function"!=typeof e)throw new Ce(r);return t=null==t?0:gn(hs(t),0),Yr((function(n){var r=n[t],o=xo(n,0,t);return r&&Nt(o,r),Ot(e,this,o)}))},Bn.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},Bn.take=function(e,t,r){return e&&e.length?to(e,0,(t=r||t===n?1:hs(t))<0?0:t):[]},Bn.takeRight=function(e,t,r){var o=null==e?0:e.length;return o?to(e,(t=o-(t=r||t===n?1:hs(t)))<0?0:t,o):[]},Bn.takeRightWhile=function(e,t){return e&&e.length?fo(e,si(t,3),!1,!0):[]},Bn.takeWhile=function(e,t){return e&&e.length?fo(e,si(t,3)):[]},Bn.tap=function(e,t){return t(e),e},Bn.throttle=function(e,t,n){var o=!0,i=!0;if("function"!=typeof e)throw new Ce(r);return es(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),Aa(e,t,{leading:o,maxWait:t,trailing:i})},Bn.thru=pa,Bn.toArray=ds,Bn.toPairs=zs,Bn.toPairsIn=Bs,Bn.toPath=function(e){return Ua(e)?Mt(e,Li):ls(e)?[e]:Po(Ri(vs(e)))},Bn.toPlainObject=gs,Bn.transform=function(e,t,n){var r=Ua(e),o=r||Ya(e)||cs(e);if(t=si(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:es(e)&&Za(i)?Fn(qe(e)):{}}return(o?jt:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},Bn.unary=function(e){return Ea(e,1)},Bn.union=ta,Bn.unionBy=na,Bn.unionWith=ra,Bn.uniq=function(e){return e&&e.length?lo(e):[]},Bn.uniqBy=function(e,t){return e&&e.length?lo(e,si(t,2)):[]},Bn.uniqWith=function(e,t){return t="function"==typeof t?t:n,e&&e.length?lo(e,n,t):[]},Bn.unset=function(e,t){return null==e||co(e,t)},Bn.unzip=oa,Bn.unzipWith=ia,Bn.update=function(e,t,n){return null==e?e:uo(e,t,go(n))},Bn.updateWith=function(e,t,r,o){return o="function"==typeof o?o:n,null==e?e:uo(e,t,go(r),o)},Bn.values=Fs,Bn.valuesIn=function(e){return null==e?[]:Zt(e,Ms(e))},Bn.without=aa,Bn.words=Zs,Bn.wrap=function(e,t){return La(go(t),e)},Bn.xor=sa,Bn.xorBy=la,Bn.xorWith=ca,Bn.zip=ua,Bn.zipObject=function(e,t){return mo(e||[],t||[],er)},Bn.zipObjectDeep=function(e,t){return mo(e||[],t||[],Zr)},Bn.zipWith=fa,Bn.entries=zs,Bn.entriesIn=Bs,Bn.extend=xs,Bn.extendWith=ws,sl(Bn,Bn),Bn.add=gl,Bn.attempt=Js,Bn.camelCase=Ws,Bn.capitalize=Vs,Bn.ceil=vl,Bn.clamp=function(e,t,r){return r===n&&(r=t,t=n),r!==n&&(r=(r=ys(r))==r?r:0),t!==n&&(t=(t=ys(t))==t?t:0),ar(ys(e),t,r)},Bn.clone=function(e){return sr(e,4)},Bn.cloneDeep=function(e){return sr(e,5)},Bn.cloneDeepWith=function(e,t){return sr(e,5,t="function"==typeof t?t:n)},Bn.cloneWith=function(e,t){return sr(e,4,t="function"==typeof t?t:n)},Bn.conformsTo=function(e,t){return null==t||lr(e,t,As(t))},Bn.deburr=$s,Bn.defaultTo=function(e,t){return null==e||e!=e?t:e},Bn.divide=bl,Bn.endsWith=function(e,t,r){e=vs(e),t=so(t);var o=e.length,i=r=r===n?o:ar(hs(r),0,o);return(r-=t.length)>=0&&e.slice(r,i)==t},Bn.eq=Fa,Bn.escape=function(e){return(e=vs(e))&&X.test(e)?e.replace(H,nn):e},Bn.escapeRegExp=function(e){return(e=vs(e))&&re.test(e)?e.replace(ne,"\\$&"):e},Bn.every=function(e,t,r){var o=Ua(e)?Pt:pr;return r&&vi(e,t,r)&&(t=n),o(e,si(t,3))},Bn.find=ya,Bn.findIndex=$i,Bn.findKey=function(e,t){return zt(e,si(t,3),br)},Bn.findLast=ga,Bn.findLastIndex=Ui,Bn.findLastKey=function(e,t){return zt(e,si(t,3),xr)},Bn.floor=xl,Bn.forEach=va,Bn.forEachRight=ba,Bn.forIn=function(e,t){return null==e?e:gr(e,si(t,3),Ms)},Bn.forInRight=function(e,t){return null==e?e:vr(e,si(t,3),Ms)},Bn.forOwn=function(e,t){return e&&br(e,si(t,3))},Bn.forOwnRight=function(e,t){return e&&xr(e,si(t,3))},Bn.get=js,Bn.gt=Wa,Bn.gte=Va,Bn.has=function(e,t){return null!=e&&hi(e,t,jr)},Bn.hasIn=Es,Bn.head=qi,Bn.identity=rl,Bn.includes=function(e,t,n,r){e=qa(e)?e:Fs(e),n=n&&!r?hs(n):0;var o=e.length;return n<0&&(n=gn(o+n,0)),ss(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&Ft(e,t,n)>-1},Bn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:hs(n);return o<0&&(o=gn(r+o,0)),Ft(e,t,o)},Bn.inRange=function(e,t,r){return t=ps(t),r===n?(r=t,t=0):r=ps(r),function(e,t,n){return e>=vn(t,n)&&e<gn(t,n)}(e=ys(e),t,r)},Bn.invoke=Ts,Bn.isArguments=$a,Bn.isArray=Ua,Bn.isArrayBuffer=Ka,Bn.isArrayLike=qa,Bn.isArrayLikeObject=Ha,Bn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Or(e)==v},Bn.isBuffer=Ya,Bn.isDate=Xa,Bn.isElement=function(e){return ts(e)&&1===e.nodeType&&!os(e)},Bn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cs(e)||$a(e)))return!e.length;var t=pi(e);if(t==S||t==P)return!e.size;if(_i(e))return!Ir(e).length;for(var n in e)if(Ie.call(e,n))return!1;return!0},Bn.isEqual=function(e,t){return Ar(e,t)},Bn.isEqualWith=function(e,t,r){var o=(r="function"==typeof r?r:n)?r(e,t):n;return o===n?Ar(e,t,n,r):!!o},Bn.isError=Ga,Bn.isFinite=function(e){return"number"==typeof e&&Kt(e)},Bn.isFunction=Za,Bn.isInteger=Ja,Bn.isLength=Qa,Bn.isMap=ns,Bn.isMatch=function(e,t){return e===t||Mr(e,t,ci(t))},Bn.isMatchWith=function(e,t,r){return r="function"==typeof r?r:n,Mr(e,t,ci(t),r)},Bn.isNaN=function(e){return rs(e)&&e!=+e},Bn.isNative=function(e){if(wi(e))throw new Se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(e)},Bn.isNil=function(e){return null==e},Bn.isNull=function(e){return null===e},Bn.isNumber=rs,Bn.isObject=es,Bn.isObjectLike=ts,Bn.isPlainObject=os,Bn.isRegExp=is,Bn.isSafeInteger=function(e){return Ja(e)&&e>=-c&&e<=c},Bn.isSet=as,Bn.isString=ss,Bn.isSymbol=ls,Bn.isTypedArray=cs,Bn.isUndefined=function(e){return e===n},Bn.isWeakMap=function(e){return ts(e)&&pi(e)==A},Bn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Or(e)},Bn.join=function(e,t){return null==e?"":mn.call(e,t)},Bn.kebabCase=Us,Bn.last=Gi,Bn.lastIndexOf=function(e,t,r){var o=null==e?0:e.length;if(!o)return-1;var i=o;return r!==n&&(i=(i=hs(r))<0?gn(o+i,0):vn(i,o-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Bt(e,Vt,i,!0)},Bn.lowerCase=Ks,Bn.lowerFirst=qs,Bn.lt=us,Bn.lte=fs,Bn.max=function(e){return e&&e.length?hr(e,rl,kr):n},Bn.maxBy=function(e,t){return e&&e.length?hr(e,si(t,2),kr):n},Bn.mean=function(e){return $t(e,rl)},Bn.meanBy=function(e,t){return $t(e,si(t,2))},Bn.min=function(e){return e&&e.length?hr(e,rl,Rr):n},Bn.minBy=function(e,t){return e&&e.length?hr(e,si(t,2),Rr):n},Bn.stubArray=ml,Bn.stubFalse=yl,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=wl,Bn.nth=function(e,t){return e&&e.length?Wr(e,hs(t)):n},Bn.noConflict=function(){return dt._===this&&(dt._=Fe),this},Bn.noop=ll,Bn.now=ja,Bn.pad=function(e,t,n){e=vs(e);var r=(t=hs(t))?un(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return $o(yt(o),n)+e+$o(ht(o),n)},Bn.padEnd=function(e,t,n){e=vs(e);var r=(t=hs(t))?un(e):0;return t&&r<t?e+$o(t-r,n):e},Bn.padStart=function(e,t,n){e=vs(e);var r=(t=hs(t))?un(e):0;return t&&r<t?$o(t-r,n)+e:e},Bn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),xn(vs(e).replace(oe,""),t||0)},Bn.random=function(e,t,r){if(r&&"boolean"!=typeof r&&vi(e,t,r)&&(t=r=n),r===n&&("boolean"==typeof t?(r=t,t=n):"boolean"==typeof e&&(r=e,e=n)),e===n&&t===n?(e=0,t=1):(e=ps(e),t===n?(t=e,e=0):t=ps(t)),e>t){var o=e;e=t,t=o}if(r||e%1||t%1){var i=wn();return vn(e+i*(t-e+lt("1e-"+((i+"").length-1))),t)}return qr(e,t)},Bn.reduce=function(e,t,n){var r=Ua(e)?Dt:qt,o=arguments.length<3;return r(e,si(t,4),n,o,fr)},Bn.reduceRight=function(e,t,n){var r=Ua(e)?It:qt,o=arguments.length<3;return r(e,si(t,4),n,o,dr)},Bn.repeat=function(e,t,r){return t=(r?vi(e,t,r):t===n)?1:hs(t),Hr(vs(e),t)},Bn.replace=function(){var e=arguments,t=vs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Bn.result=function(e,t,r){var o=-1,i=(t=vo(t,e)).length;for(i||(i=1,e=n);++o<i;){var a=null==e?n:e[Li(t[o])];a===n&&(o=i,a=r),e=Za(a)?a.call(e):a}return e},Bn.round=_l,Bn.runInContext=e,Bn.sample=function(e){return(Ua(e)?Gn:Xr)(e)},Bn.size=function(e){if(null==e)return 0;if(qa(e))return ss(e)?un(e):e.length;var t=pi(e);return t==S||t==P?e.size:Ir(e).length},Bn.snakeCase=Hs,Bn.some=function(e,t,r){var o=Ua(e)?Rt:no;return r&&vi(e,t,r)&&(t=n),o(e,si(t,3))},Bn.sortedIndex=function(e,t){return ro(e,t)},Bn.sortedIndexBy=function(e,t,n){return oo(e,t,si(n,2))},Bn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ro(e,t);if(r<n&&Fa(e[r],t))return r}return-1},Bn.sortedLastIndex=function(e,t){return ro(e,t,!0)},Bn.sortedLastIndexBy=function(e,t,n){return oo(e,t,si(n,2),!0)},Bn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ro(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},Bn.startCase=Ys,Bn.startsWith=function(e,t,n){return e=vs(e),n=null==n?0:ar(hs(n),0,e.length),t=so(t),e.slice(n,n+t.length)==t},Bn.subtract=Sl,Bn.sum=function(e){return e&&e.length?Ht(e,rl):0},Bn.sumBy=function(e,t){return e&&e.length?Ht(e,si(t,2)):0},Bn.template=function(e,t,r){var o=Bn.templateSettings;r&&vi(e,t,r)&&(t=n),e=vs(e),t=ws({},t,o,Zo);var i,a,s=ws({},t.imports,o.imports,Zo),l=As(s),c=Zt(s,l),u=0,f=t.interpolate||xe,d="__p += '",p=Ee((t.escape||xe).source+"|"+f.source+"|"+(f===J?de:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),h="//# sourceURL="+(Ie.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ot+"]")+"\n";e.replace(p,(function(t,n,r,o,s,l){return r||(r=o),d+=e.slice(u,l).replace(we,rn),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),s&&(a=!0,d+="';\n"+s+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+t.length,t})),d+="';\n";var m=Ie.call(t,"variable")&&t.variable;if(m){if(ue.test(m))throw new Se("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace($,""):d).replace(U,"$1").replace(K,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var y=Js((function(){return Oe(l,h+"return "+d).apply(n,c)}));if(y.source=d,Ga(y))throw y;return y},Bn.times=function(e,t){if((e=hs(e))<1||e>c)return[];var n=f,r=vn(e,f);t=si(t),e-=f;for(var o=Yt(r,t);++n<e;)t(n);return o},Bn.toFinite=ps,Bn.toInteger=hs,Bn.toLength=ms,Bn.toLower=function(e){return vs(e).toLowerCase()},Bn.toNumber=ys,Bn.toSafeInteger=function(e){return e?ar(hs(e),-c,c):0===e?e:0},Bn.toString=vs,Bn.toUpper=function(e){return vs(e).toUpperCase()},Bn.trim=function(e,t,r){if((e=vs(e))&&(r||t===n))return Xt(e);if(!e||!(t=so(t)))return e;var o=fn(e),i=fn(t);return xo(o,Qt(o,i),en(o,i)+1).join("")},Bn.trimEnd=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.slice(0,dn(e)+1);if(!e||!(t=so(t)))return e;var o=fn(e);return xo(o,0,en(o,fn(t))+1).join("")},Bn.trimStart=function(e,t,r){if((e=vs(e))&&(r||t===n))return e.replace(oe,"");if(!e||!(t=so(t)))return e;var o=fn(e);return xo(o,Qt(o,fn(t))).join("")},Bn.truncate=function(e,t){var r=30,o="...";if(es(t)){var i="separator"in t?t.separator:i;r="length"in t?hs(t.length):r,o="omission"in t?so(t.omission):o}var a=(e=vs(e)).length;if(on(e)){var s=fn(e);a=s.length}if(r>=a)return e;var l=r-un(o);if(l<1)return o;var c=s?xo(s,0,l).join(""):e.slice(0,l);if(i===n)return c+o;if(s&&(l+=c.length-l),is(i)){if(e.slice(l).search(i)){var u,f=c;for(i.global||(i=Ee(i.source,vs(pe.exec(i))+"g")),i.lastIndex=0;u=i.exec(f);)var d=u.index;c=c.slice(0,d===n?l:d)}}else if(e.indexOf(so(i),l)!=l){var p=c.lastIndexOf(i);p>-1&&(c=c.slice(0,p))}return c+o},Bn.unescape=function(e){return(e=vs(e))&&Y.test(e)?e.replace(q,pn):e},Bn.uniqueId=function(e){var t=++Re;return vs(e)+t},Bn.upperCase=Xs,Bn.upperFirst=Gs,Bn.each=va,Bn.eachRight=ba,Bn.first=qi,sl(Bn,function(){var e={};return br(Bn,(function(t,n){Ie.call(Bn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Bn.VERSION="4.17.21",jt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Bn[e].placeholder=Bn})),jt(["drop","take"],(function(e,t){$n.prototype[e]=function(r){r=r===n?1:gn(hs(r),0);var o=this.__filtered__&&!t?new $n(this):this.clone();return o.__filtered__?o.__takeCount__=vn(r,o.__takeCount__):o.__views__.push({size:vn(r,f),type:e+(o.__dir__<0?"Right":"")}),o},$n.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),jt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;$n.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:si(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),jt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");$n.prototype[e]=function(){return this[n](1).value()[0]}})),jt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");$n.prototype[e]=function(){return this.__filtered__?new $n(this):this[n](1)}})),$n.prototype.compact=function(){return this.filter(rl)},$n.prototype.find=function(e){return this.filter(e).head()},$n.prototype.findLast=function(e){return this.reverse().find(e)},$n.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new $n(this):this.map((function(n){return Cr(n,e,t)}))})),$n.prototype.reject=function(e){return this.filter(Ia(si(e)))},$n.prototype.slice=function(e,t){e=hs(e);var r=this;return r.__filtered__&&(e>0||t<0)?new $n(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==n&&(r=(t=hs(t))<0?r.dropRight(-t):r.take(t-e)),r)},$n.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},$n.prototype.toArray=function(){return this.take(f)},br($n.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),i=Bn[o?"take"+("last"==t?"Right":""):t],a=o||/^find/.test(t);i&&(Bn.prototype[t]=function(){var t=this.__wrapped__,s=o?[1]:arguments,l=t instanceof $n,c=s[0],u=l||Ua(t),f=function(e){var t=i.apply(Bn,Nt([e],s));return o&&d?t[0]:t};u&&r&&"function"==typeof c&&1!=c.length&&(l=u=!1);var d=this.__chain__,p=!!this.__actions__.length,h=a&&!d,m=l&&!p;if(!a&&u){t=m?t:new $n(this);var y=e.apply(t,s);return y.__actions__.push({func:pa,args:[f],thisArg:n}),new Vn(y,d)}return h&&m?e.apply(this,s):(y=this.thru(f),h?o?y.value()[0]:y.value():y)})})),jt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Te[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Bn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Ua(o)?o:[],e)}return this[n]((function(n){return t.apply(Ua(n)?n:[],e)}))}})),br($n.prototype,(function(e,t){var n=Bn[t];if(n){var r=n.name+"";Ie.call(Tn,r)||(Tn[r]=[]),Tn[r].push({name:t,func:n})}})),Tn[Bo(n,2).name]=[{name:"wrapper",func:n}],$n.prototype.clone=function(){var e=new $n(this.__wrapped__);return e.__actions__=Po(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Po(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Po(this.__views__),e},$n.prototype.reverse=function(){if(this.__filtered__){var e=new $n(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},$n.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=vn(t,e+a);break;case"takeRight":e=gn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,s=i.end,l=s-a,c=r?s:a-1,u=this.__iteratees__,f=u.length,d=0,p=vn(l,this.__takeCount__);if(!n||!r&&o==l&&p==l)return po(e,this.__actions__);var h=[];e:for(;l--&&d<p;){for(var m=-1,y=e[c+=t];++m<f;){var g=u[m],v=g.iteratee,b=g.type,x=v(y);if(2==b)y=x;else if(!x){if(1==b)continue e;break e}}h[d++]=y}return h},Bn.prototype.at=ha,Bn.prototype.chain=function(){return da(this)},Bn.prototype.commit=function(){return new Vn(this.value(),this.__chain__)},Bn.prototype.next=function(){this.__values__===n&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?n:this.__values__[this.__index__++]}},Bn.prototype.plant=function(e){for(var t,r=this;r instanceof Wn;){var o=Bi(r);o.__index__=0,o.__values__=n,t?i.__wrapped__=o:t=o;var i=o;r=r.__wrapped__}return i.__wrapped__=e,t},Bn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof $n){var t=e;return this.__actions__.length&&(t=new $n(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ea],thisArg:n}),new Vn(t,this.__chain__)}return this.thru(ea)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return po(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Qe&&(Bn.prototype[Qe]=function(){return this}),Bn}();ht?((ht.exports=hn)._=hn,pt._=hn):dt._=hn}).call(h)}(dw,dw.exports);var pw=dw.exports;const hw={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},mw={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},yw={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong",ghost:"bg-field-secondary-background outline outline-1 outline-transparent"},gw={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"border-border-disabled hover:border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"border-border-disabled hover:border-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"},vw=(0,f.createContext)({}),bw=()=>(0,f.useContext)(vw),xw=(0,f.forwardRef)((({className:e,size:t="sm",open:n=!1,onOpenChange:r=()=>{},loading:o=!1,...i},a)=>{const[s,l]=(0,f.useState)(""),[c,d]=(0,f.useState)(o??!1),{refs:p,floatingStyles:h,context:m}=go({open:n,onOpenChange:r,placement:"bottom-start",whileElementsMounted:Fn,middleware:[Jn("sm"===t?4:6),er({padding:10}),tr({apply({rects:e,elements:t,availableHeight:n}){t.floating.style.maxHeight=`${n}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),y=yo(m),{getReferenceProps:g,getFloatingProps:v}=wo([y]);return(0,f.useEffect)((()=>{const e=(()=>{var e,t;const n=(null==(t=null==(e=window.navigator)?void 0:e.userAgentData)?void 0:t.platform)||window.navigator.platform;let r="null";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(n)?r="Mac OS":["Win32","Win64","Windows","WinCE"].includes(n)&&(r="Windows"),r})(),t=t=>{const n="Mac OS"===e?t.metaKey:t.ctrlKey;if("/"===t.key&&n&&(t.preventDefault(),p.reference&&p.reference.current)){const e=p.reference.current instanceof HTMLElement?p.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}}),[p.reference]),(0,u.jsx)(vw.Provider,{value:{size:t,open:n,onOpenChange:r,refs:p,floatingStyles:h,context:m,getReferenceProps:g,getFloatingProps:v,searchTerm:s,setSearchTerm:l,isLoading:c,setIsLoading:d},children:(0,u.jsx)("div",{className:ve("searchbox-wrapper box-border relative w-full",e),...i,ref:a})})}));xw.displayName="SearchBox";const ww=(0,f.forwardRef)((({className:e,type:t="text",placeholder:n="Search...",variant:r="primary",disabled:o=!1,onChange:i=()=>{},...a},s)=>{const{size:l,onOpenChange:c,refs:f,getReferenceProps:d,searchTerm:p,setSearchTerm:h}=bw(),m="lg"===l?"sm":"xs";return(0,u.jsxs)("div",{ref:f.setReference,className:ve("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-colors ease-in-out duration-150",yw[r],mw.input[l],o?gw[r]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border"),...d,children:[(0,u.jsx)("span",{className:ve(hw[l],o?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,u.jsx)(qe,{})}),(0,u.jsx)("input",{type:t,ref:s,className:ve(hw[l],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 py-0",o?gw[r]:["text-field-placeholder focus-within:text-field-input group-hover:text-field-input","placeholder:text-field-placeholder"],e),disabled:o,value:p,onChange:e=>{const t=e.target.value;h(t),i(t),"function"==typeof c&&(t.trim()?c(!0):c(!1))},placeholder:n,...pw.omit(a,["size","open","onOpenChange","loading"])}),(0,u.jsx)(Ho,{label:"⌘/",size:m,type:"rounded",variant:"neutral"})]})}));ww.displayName="SearchBox.Input";const _w=({className:e,dropdownPortalRoot:t=null,dropdownPortalId:n="",children:r,...o})=>{const{size:i,open:a,refs:s,floatingStyles:l,getFloatingProps:c}=bw();return a?(0,u.jsx)(eo,{id:n,root:t,children:(0,u.jsx)("div",{ref:s.setFloating,style:{...l},className:ve("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap",mw.dialog[i],e),...c(),...o,children:r})}):null};_w.displayName="SearchBox.Content";const Sw=({filter:e=!0,children:t})=>{const{searchTerm:n,isLoading:r}=bw();if(!e)return(0,u.jsx)("div",{children:t});const o=f.Children.toArray(t).map((e=>{if(f.isValidElement(e)&&e.type===kw){const t=f.Children.toArray(e.props.children).filter((e=>f.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(n.toLowerCase())));return t.length>0?(0,f.cloneElement)(e,{children:t}):null}return e})).filter(Boolean);return r?(0,u.jsx)(Ew,{}):(0,u.jsx)("div",{children:o.some((e=>f.isValidElement(e)&&e.type!==Pw))?o:(0,u.jsx)(Ow,{})})};Sw.displayName="SearchBox.List";const Ow=({children:e="No results found."})=>{const{size:t}=bw();return(0,u.jsx)("div",{className:ve("flex justify-center items-center",mw.item[t],"text-text-tertiary p-4"),children:e})};Ow.displayName="SearchBox.Empty";const kw=({heading:e,children:t})=>{const{size:n}=bw();return(0,u.jsxs)("div",{className:ve(mw.content[n],mw.item[n]),children:[e&&(0,u.jsx)("div",{className:ve(mw.title[n],"text-text-secondary"),children:e}),t]})};kw.displayName="SearchBox.Group";const jw=(0,f.forwardRef)((({className:e,icon:t,children:n,...r},o)=>{const{size:i}=bw();return(0,u.jsxs)("div",{ref:o,className:ve("flex items-center justify-start gap-1 p-1 hover:bg-background-secondary focus:bg-background-secondary cursor-pointer",mw.item[i]),...r,children:[t&&(0,u.jsx)("span",{className:ve(mw.icon[i],"flex items-center justify-center"),children:t}),(0,u.jsx)("span",{className:ve("flex-grow p-1 font-normal cursor-pointer",mw.item[i],e),children:n})]})}));jw.displayName="SearchBox.Item";const Ew=({loadingIcon:e=(0,u.jsx)(Go,{})})=>{const{size:t}=bw(),n=f.isValidElement(e)?(0,f.cloneElement)(e,{size:t}):e;return(0,u.jsx)("div",{className:ve("flex justify-center p-4",hw[t],mw.item[t]),children:n})};Ew.displayName="SearchBox.Loading";const Pw=(0,f.forwardRef)((({className:e,...t},n)=>(0,u.jsx)("hr",{ref:n,className:ve("border-0 border-t border-border-subtle border-solid m-0",e),...t})));Pw.displayName="SearchBox.Separator",xw.Input=ww,xw.Loading=Ew,xw.Separator=Pw,xw.Content=_w,xw.List=Sw,xw.Empty=Ow,xw.Group=kw,xw.Item=jw;const Cw=(0,f.createContext)({}),Tw=()=>(0,f.useContext)(Cw),Aw=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",children:r,className:o})=>{const[i,a]=(0,f.useState)(!1),{refs:s,floatingStyles:l,context:c}=go({open:i,onOpenChange:a,placement:e,strategy:"absolute",middleware:[Jn(t),er({boundary:n}),Qn({boundary:n})],whileElementsMounted:Fn}),d=fo(c),p=yo(c),h=Po(c,{role:"menu"}),{getReferenceProps:m,getFloatingProps:y}=wo([d,p,h]),{isMounted:g,styles:v}=Ao(c,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),b=()=>a((e=>!e));return(0,u.jsx)(Cw.Provider,{value:{refs:s,handleClose:()=>a(!1),isMounted:g,styles:v,floatingStyles:l,getFloatingProps:y},children:(0,u.jsxs)("div",{className:ve("relative inline-block",o),children:[f.Children.map(r,(e=>{var t;return f.isValidElement(e)&&"DropdownMenu.Trigger"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?(0,f.cloneElement)(e,{ref:s.setReference,onClick:b,...m()}):null})),f.Children.map(r,(e=>{var t;return f.isValidElement(e)&&"DropdownMenu.Portal"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?e:null}))]})})};Aw.displayName="DropdownMenu";const Mw=({children:e,className:t,root:n,id:r})=>{const{refs:o,floatingStyles:i,getFloatingProps:a,isMounted:s,styles:l}=Tw();return s&&(0,u.jsx)(eo,{id:r,root:n,children:(0,u.jsx)("div",{ref:o.setFloating,className:t,style:{...i,...l},...a(),children:f.Children.map(e,(e=>{var t;return"DropdownMenu.Content"===(null==(t=null==e?void 0:e.type)?void 0:t.displayName)?e:null}))})})};Mw.displayName="DropdownMenu.Portal";const Nw=f.forwardRef((({children:e,className:t,...n},r)=>(0,f.isValidElement)(e)?f.cloneElement(e,{className:ve(t,e.props.className),ref:r,...n}):(0,u.jsx)("div",{ref:r,className:ve("cursor-pointer",t),role:"button",tabIndex:0,...n,children:e})));Nw.displayName="DropdownMenu.Trigger";const Dw=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ve("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,u.jsx)(yx,{...n,children:e})});Dw.displayName="DropdownMenu.Content";const Iw=e=>(0,u.jsx)(yx.List,{...e});Iw.displayName="DropdownMenu.List";const Rw=({children:e,as:t=yx.Item,...n})=>{var r;const{handleClose:o}=Tw();return e?t===f.Fragment&&(0,f.isValidElement)(e)?(0,f.cloneElement)(e,{onClick:be(null==(r=e.props)?void 0:r.onClick,o)}):(0,u.jsx)(t,{...n,className:ve("px-2",n.className),onClick:be(n.onClick,o),children:e}):null};Rw.displayName="DropdownMenu.Item";const Lw=e=>(0,u.jsx)(yx.Separator,{...e});Lw.displayName="DropdownMenu.Separator",Aw.Trigger=Nw,Aw.Content=Dw,Aw.List=Iw,Aw.Item=Rw,Aw.Separator=Lw,Aw.Portal=Mw;const zw={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},Bw=({children:e,className:t})=>{const{open:n,position:r,handleClose:o,drawerRef:i,transitionDuration:a}=Gw();return(0,u.jsx)(bd,{children:n&&(0,u.jsx)("div",{className:"fixed inset-0",children:(0,u.jsx)("div",{className:ve("flex items-center justify-center h-full",{"justify-start":"left"===r,"justify-end":"right"===r}),children:(0,u.jsx)(dd.div,{ref:i,className:ve("flex flex-col w-120 h-full bg-background-primary shadow-2xl my-5 overflow-hidden",t),initial:"exit",animate:"open",exit:"exit",variants:zw[r],transition:a,children:"function"==typeof e?e({close:o}):e})})})})};Bw.displayName="Drawer.Panel";const Fw=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ve("space-y-2 px-5 pt-5 pb-4",t),...n,children:e});Fw.displayName="Drawer.Header";const Ww=({children:e,as:t="h3",className:n,...r})=>(0,u.jsx)(t,{className:ve("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});Ww.displayName="Drawer.Title";const Vw=({children:e,as:t="p",className:n,...r})=>(0,u.jsx)(t,{className:ve("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});Vw.displayName="Drawer.Description";const $w=({children:e,className:t,...n})=>(0,u.jsx)("div",{className:ve("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});$w.displayName="Drawer.Body";const Uw=({children:e,className:t})=>{const{design:n,handleClose:r}=Gw();return(0,u.jsx)("div",{className:ve("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===n,"border-t border-b-0 border-x-0 border-solid border-border-subtle":"footer-bordered"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};Uw.displayName="Drawer.Footer";const Kw=({className:e,...t})=>(0,u.jsx)("button",{className:ve("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:(0,u.jsx)(Ze,{className:"size-4 text-text-primary shrink-0"})}),qw=({children:e,as:t=f.Fragment,...n})=>{const{handleClose:r}=Gw();return e?t===f.Fragment?"function"==typeof e?e({close:r}):(0,f.isValidElement)(e)?(0,f.cloneElement)(e,{onClick:r}):(0,u.jsx)(Kw,{onClick:r,...n}):(0,u.jsx)(t,{...n,onClick:r,children:e}):(0,u.jsx)(Kw,{onClick:r,...n})};qw.displayName="Drawer.CloseButton";const Hw={open:{opacity:1},exit:{opacity:0}},Yw=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:o}=Gw();return null!=r&&r.current?!!r.current&&(0,p.createPortal)((0,u.jsx)(bd,{children:n&&(0,u.jsx)(dd.div,{className:ve("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:Hw,transition:o})}),r.current):null};Yw.displayName="Drawer.Backdrop";const Xw=(0,f.createContext)({}),Gw=()=>(0,f.useContext)(Xw),Zw=({open:e,setOpen:t,children:n,trigger:r,className:o,exitOnClickOutside:i=!1,exitOnEsc:a=!0,design:s="simple",position:l="right",transitionDuration:c=.2,scrollLock:d=!0})=>{const p=void 0!==e&&void 0!==t,[h,m]=(0,f.useState)(!1),y=(0,f.useRef)(null),g=(0,f.useRef)(null),v=(0,f.useMemo)((()=>p?e:h),[e,h]),b=(0,f.useMemo)((()=>p?t:m),[m,m]),x=()=>{v||b(!0)},w=()=>{v&&b(!1)},_=(0,f.useCallback)((()=>(0,f.isValidElement)(r)?(0,f.cloneElement)(r,{onClick:be(x,r.props.onClick)}):"function"==typeof r?r({onClick:x}):null),[r,x,w]),S=e=>{"Escape"===e.key&&a&&w()},O=e=>{i&&y.current&&!y.current.contains(e.target)&&w()};return(0,f.useEffect)((()=>(window.addEventListener("keydown",S),document.addEventListener("mousedown",O),()=>{window.removeEventListener("keydown",S),document.removeEventListener("mousedown",O)})),[v]),(0,f.useEffect)((()=>{if(!d)return;const e=document.querySelector("html");return v&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}}),[v]),(0,u.jsxs)(u.Fragment,{children:[_(),(0,u.jsx)(Xw.Provider,{value:{open:v,setOpen:b,handleClose:w,design:s,position:l,drawerContainerRef:g,drawerRef:y,transitionDuration:{duration:c}},children:(0,u.jsx)("div",{className:ve("fixed z-auto w-0 h-0 overflow-visible",o),ref:g,role:"dialog","aria-modal":"true","aria-label":"drawer",children:n})})]})};Zw.displayName="Drawer",Zw.Panel=Bw,Zw.Header=Fw,Zw.Title=Ww,Zw.Description=Vw,Zw.Body=$w,Zw.CloseButton=qw,Zw.Footer=Uw,Zw.Backdrop=Yw;const Jw={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},Qw="group disabled:border-field-border-disabled opacity-50",e_=(0,f.createContext)({size:"sm",disabled:!1}),t_=()=>(0,f.useContext)(e_),n_=({size:e="sm",disabled:t=!1,children:n,className:r,...o})=>(0,u.jsx)(e_.Provider,{value:{size:e,disabled:t},children:(0,u.jsx)("nav",{role:"navigation","aria-label":"pagination",className:ve("flex w-full justify-center box-border m-0",r),...o,children:n})});n_.displayName="Pagination";const r_=(0,f.forwardRef)((({className:e,...t},n)=>(0,u.jsx)("ul",{ref:n,className:ve("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t})));r_.displayName="Pagination.Content";const o_=(0,f.forwardRef)((({isActive:e=!1,className:t,children:n,...r},o)=>{const{disabled:i}=t_();return(0,u.jsx)("li",{ref:o,className:ve("flex",i&&Qw),children:(0,u.jsx)(i_,{isActive:e,disabled:i,className:t,...r,children:n})})}));o_.displayName="Pagination.Item";const i_=({isActive:e=!1,tag:t="a",children:n,className:r,...o})=>{const{size:i,disabled:a}=t_(),s=e=>e.preventDefault();return(0,u.jsx)(Oe,{tag:t,size:i,variant:"ghost",className:ve("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",Jw[i].general,!a&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",a&&[Qw,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],r),disabled:a,...o,onClick:e=>be(o.onClick||(()=>{}),a?s:()=>{})(e),children:(0,u.jsx)("span",{className:"px-1 flex",children:n})})},a_=e=>{const{size:t,disabled:n}=t_();return(0,u.jsx)("li",{className:ve("flex",n&&Qw),"aria-label":"Go to previous page",children:(0,u.jsx)(i_,{className:ve("[&>span]:flex [&>span]:items-center"),...e,children:(0,u.jsx)(Re,{className:ve(Jw[t].icon)})})})};a_.displayName="Pagination.Previous";const s_=e=>{const{size:t,disabled:n}=t_();return(0,u.jsx)("li",{className:ve("flex",n&&Qw),"aria-label":"Go to next page",children:(0,u.jsx)(i_,{className:ve("[&>span]:flex [&>span]:items-center"),...e,children:(0,u.jsx)(Le,{className:ve(Jw[t].icon)})})})};s_.displayName="Pagination.Next";const l_=e=>{const{size:t,disabled:n}=t_();return(0,u.jsx)("li",{className:ve("flex",n&&Qw),children:(0,u.jsx)("span",{className:ve("flex justify-center",Jw[t].ellipse,n&&Qw),...e,children:"•••"})})};var c_,u_,f_;l_.displayName="Pagination.Ellipsis",n_.Content=r_,n_.Item=o_,n_.Previous=a_,n_.Next=s_,n_.Ellipsis=l_,function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(c_||(c_={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(u_||(u_={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(f_||(f_={}));const d_=6048e5,p_=Symbol.for("constructDateFrom");function h_(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&p_ in e?e[p_](t):e instanceof Date?new e.constructor(t):new Date(t)}function m_(e,t){return h_(t||e,e)}function y_(e,t,n){const r=m_(e,null==n?void 0:n.in);return isNaN(t)?h_(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function g_(e,t,n){const r=m_(e,null==n?void 0:n.in);if(isNaN(t))return h_(e,NaN);if(!t)return r;const o=r.getDate(),i=h_(e,r.getTime());return i.setMonth(r.getMonth()+t+1,0),o>=i.getDate()?i:(r.setFullYear(i.getFullYear(),i.getMonth(),o),r)}let v_={};function b_(){return v_}function x_(e,t){var n,r,o,i;const a=b_(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.weekStartsOn)??0,l=m_(e,null==t?void 0:t.in),c=l.getDay(),u=(c<s?7:0)+c-s;return l.setDate(l.getDate()-u),l.setHours(0,0,0,0),l}function w_(e,t){return x_(e,{...t,weekStartsOn:1})}function __(e,t){const n=m_(e,null==t?void 0:t.in),r=n.getFullYear(),o=h_(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=w_(o),a=h_(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=w_(a);return n.getTime()>=i.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function S_(e){const t=m_(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function O_(e,...t){const n=h_.bind(null,t.find((e=>"object"==typeof e)));return t.map(n)}function k_(e,t){const n=m_(e,null==t?void 0:t.in);return n.setHours(0,0,0,0),n}function j_(e,t,n){const[r,o]=O_(null==n||n.in,e,t),i=k_(r),a=k_(o),s=+i-S_(i),l=+a-S_(a);return Math.round((s-l)/864e5)}function E_(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function P_(e,t){const n=m_(e,null==t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function C_(e,t){var n,r,o,i;const a=b_(),s=(null==t?void 0:t.weekStartsOn)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.weekStartsOn)??a.weekStartsOn??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.weekStartsOn)??0,l=m_(e,null==t?void 0:t.in),c=l.getDay(),u=6+(c<s?-7:0)-(c-s);return l.setDate(l.getDate()+u),l.setHours(23,59,59,999),l}const T_={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function A_(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const M_={date:A_({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:A_({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:A_({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},N_={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function D_(e){return(t,n)=>{let r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=null!=n&&n.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=null!=n&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const I_={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:D_({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:D_({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:D_({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:D_({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:D_({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function R_(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e){for(let t=0;t<e.length;t++)if(e[t].test(a))return t}(s):function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&e[t].test(a))return t}(s);let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(a.length)}}}const L_={ordinalNumber:function(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];return a=n.valueCallback?n.valueCallback(a):a,{value:a,rest:t.slice(o.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)}),era:R_({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:R_({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:R_({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:R_({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:R_({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},z_={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=T_[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:M_,formatRelative:(e,t,n,r)=>N_[e],localize:I_,match:L_,options:{weekStartsOn:0,firstWeekContainsDate:1}};function B_(e,t){const n=m_(e,null==t?void 0:t.in),r=+w_(n)-+function(e){const t=__(e,void 0),n=h_(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),w_(n)}(n);return Math.round(r/d_)+1}function F_(e,t){var n,r,o,i;const a=m_(e,null==t?void 0:t.in),s=a.getFullYear(),l=b_(),c=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??l.firstWeekContainsDate??(null==(i=null==(o=l.locale)?void 0:o.options)?void 0:i.firstWeekContainsDate)??1,u=h_((null==t?void 0:t.in)||e,0);u.setFullYear(s+1,0,c),u.setHours(0,0,0,0);const f=x_(u,t),d=h_((null==t?void 0:t.in)||e,0);d.setFullYear(s,0,c),d.setHours(0,0,0,0);const p=x_(d,t);return+a>=+f?s+1:+a>=+p?s:s-1}function W_(e,t){const n=m_(e,null==t?void 0:t.in),r=+x_(n,t)-+function(e,t){var n,r,o,i;const a=b_(),s=(null==t?void 0:t.firstWeekContainsDate)??(null==(r=null==(n=null==t?void 0:t.locale)?void 0:n.options)?void 0:r.firstWeekContainsDate)??a.firstWeekContainsDate??(null==(i=null==(o=a.locale)?void 0:o.options)?void 0:i.firstWeekContainsDate)??1,l=F_(e,t),c=h_((null==t?void 0:t.in)||e,0);return c.setFullYear(l,0,s),c.setHours(0,0,0,0),x_(c,t)}(n,t);return Math.round(r/d_)+1}function V_(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const $_={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return V_("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):V_(n+1,2)},d:(e,t)=>V_(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>V_(e.getHours()%12||12,t.length),H:(e,t)=>V_(e.getHours(),t.length),m:(e,t)=>V_(e.getMinutes(),t.length),s:(e,t)=>V_(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return V_(Math.trunc(r*Math.pow(10,n-3)),t.length)}},U_={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return $_.y(e,t)},Y:function(e,t,n,r){const o=F_(e,r),i=o>0?o:1-o;return"YY"===t?V_(i%100,2):"Yo"===t?n.ordinalNumber(i,{unit:"year"}):V_(i,t.length)},R:function(e,t){return V_(__(e),t.length)},u:function(e,t){return V_(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return V_(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return V_(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return $_.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return V_(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=W_(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):V_(o,t.length)},I:function(e,t,n){const r=B_(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):V_(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):$_.d(e,t)},D:function(e,t,n){const r=function(e){const t=m_(e,void 0);return j_(t,P_(t))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):V_(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return V_(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return V_(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return V_(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return $_.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):$_.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):V_(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):V_(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):$_.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):$_.s(e,t)},S:function(e,t){return $_.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return q_(r);case"XXXX":case"XX":return H_(r);default:return H_(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return q_(r);case"xxxx":case"xx":return H_(r);default:return H_(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+K_(r,":");default:return"GMT"+H_(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+K_(r,":");default:return"GMT"+H_(r,":")}},t:function(e,t,n){return V_(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return V_(+e,t.length)}};function K_(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),i=r%60;return 0===i?n+String(o):n+String(o)+t+V_(i,2)}function q_(e,t){return e%60==0?(e>0?"-":"+")+V_(Math.abs(e)/60,2):H_(e,t)}function H_(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+V_(Math.trunc(r/60),2)+t+V_(r%60,2)}const Y_=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},X_=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},G_={p:X_,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Y_(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",Y_(r,t)).replace("{{time}}",X_(o,t))}},Z_=/^D+$/,J_=/^Y+$/,Q_=["D","DD","YY","YYYY"],eS=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,tS=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,nS=/^'([^]*?)'?$/,rS=/''/g,oS=/[a-zA-Z]/;function iS(e){const t=e.match(nS);return t?t[1].replace(rS,"'"):e}class aS{constructor(e,t){this.Date=Date,this.addDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addDays?this.overrides.addDays(e,t):y_(e,t)},this.addMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addMonths?this.overrides.addMonths(e,t):g_(e,t)},this.addWeeks=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addWeeks?this.overrides.addWeeks(e,t):function(e,t){return y_(e,7*t,void 0)}(e,t)},this.addYears=(e,t)=>{var n;return null!=(n=this.overrides)&&n.addYears?this.overrides.addYears(e,t):function(e,t){return g_(e,12*t,void 0)}(e,t)},this.differenceInCalendarDays=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):j_(e,t)},this.differenceInCalendarMonths=(e,t)=>{var n;return null!=(n=this.overrides)&&n.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):function(e,t){const[n,r]=O_(0,e,t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(e,t)},this.endOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e){return C_(e,{weekStartsOn:1})}(e)},this.endOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.endOfMonth?this.overrides.endOfMonth(e):function(e,t){const n=m_(e,null==t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}(e)},this.endOfWeek=e=>{var t;return null!=(t=this.overrides)&&t.endOfWeek?this.overrides.endOfWeek(e,this.options):C_(e,this.options)},this.endOfYear=e=>{var t;return null!=(t=this.overrides)&&t.endOfYear?this.overrides.endOfYear(e):function(e){const t=m_(e,void 0),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}(e)},this.format=(e,t)=>{var n;return null!=(n=this.overrides)&&n.format?this.overrides.format(e,t,this.options):function(e,t,n){var r,o,i,a,s,l,c,u;const f=b_(),d=(null==n?void 0:n.locale)??f.locale??z_,p=(null==n?void 0:n.firstWeekContainsDate)??(null==(o=null==(r=null==n?void 0:n.locale)?void 0:r.options)?void 0:o.firstWeekContainsDate)??f.firstWeekContainsDate??(null==(a=null==(i=f.locale)?void 0:i.options)?void 0:a.firstWeekContainsDate)??1,h=(null==n?void 0:n.weekStartsOn)??(null==(l=null==(s=null==n?void 0:n.locale)?void 0:s.options)?void 0:l.weekStartsOn)??f.weekStartsOn??(null==(u=null==(c=f.locale)?void 0:c.options)?void 0:u.weekStartsOn)??0,m=m_(e,null==n?void 0:n.in);if(!function(e){return!(!E_(e)&&"number"!=typeof e||isNaN(+m_(e)))}(m))throw new RangeError("Invalid time value");let y=t.match(tS).map((e=>{const t=e[0];return"p"===t||"P"===t?(0,G_[t])(e,d.formatLong):e})).join("").match(eS).map((e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:iS(e)};if(U_[t])return{isToken:!0,value:e};if(t.match(oS))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}));d.localize.preprocessor&&(y=d.localize.preprocessor(m,y));const g={firstWeekContainsDate:p,weekStartsOn:h,locale:d};return y.map((r=>{if(!r.isToken)return r.value;const o=r.value;return((null==n||!n.useAdditionalWeekYearTokens)&&function(e){return J_.test(e)}(o)||(null==n||!n.useAdditionalDayOfYearTokens)&&function(e){return Z_.test(e)}(o))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),Q_.includes(e))throw new RangeError(r)}(o,t,String(e)),(0,U_[o[0]])(m,o,d.localize,g)})).join("")}(e,t,this.options)},this.getISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.getISOWeek?this.overrides.getISOWeek(e):B_(e)},this.getWeek=e=>{var t;return null!=(t=this.overrides)&&t.getWeek?this.overrides.getWeek(e,this.options):W_(e,this.options)},this.isAfter=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isAfter?this.overrides.isAfter(e,t):function(e,t){return+m_(e)>+m_(t)}(e,t)},this.isBefore=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isBefore?this.overrides.isBefore(e,t):function(e,t){return+m_(e)<+m_(t)}(e,t)},this.isDate=e=>{var t;return null!=(t=this.overrides)&&t.isDate?this.overrides.isDate(e):E_(e)},this.isSameDay=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameDay?this.overrides.isSameDay(e,t):function(e,t){const[n,r]=O_(0,e,t);return+k_(n)==+k_(r)}(e,t)},this.isSameMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t){const[n,r]=O_(0,e,t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}(e,t)},this.isSameYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.isSameYear?this.overrides.isSameYear(e,t):function(e,t){const[n,r]=O_(0,e,t);return n.getFullYear()===r.getFullYear()}(e,t)},this.max=e=>{var t;return null!=(t=this.overrides)&&t.max?this.overrides.max(e):function(e){let t,n;return e.forEach((e=>{!n&&"object"==typeof e&&(n=h_.bind(null,e));const r=m_(e,n);(!t||t<r||isNaN(+r))&&(t=r)})),h_(n,t||NaN)}(e)},this.min=e=>{var t;return null!=(t=this.overrides)&&t.min?this.overrides.min(e):function(e){let t,n;return e.forEach((e=>{!n&&"object"==typeof e&&(n=h_.bind(null,e));const r=m_(e,n);(!t||t>r||isNaN(+r))&&(t=r)})),h_(n,t||NaN)}(e)},this.setMonth=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setMonth?this.overrides.setMonth(e,t):function(e,t,n){const r=m_(e,null==n?void 0:n.in),o=r.getFullYear(),i=r.getDate(),a=h_(e,0);a.setFullYear(o,t,15),a.setHours(0,0,0,0);const s=function(e){const t=m_(e,void 0),n=t.getFullYear(),r=t.getMonth(),o=h_(t,0);return o.setFullYear(n,r+1,0),o.setHours(0,0,0,0),o.getDate()}(a);return r.setMonth(t,Math.min(i,s)),r}(e,t)},this.setYear=(e,t)=>{var n;return null!=(n=this.overrides)&&n.setYear?this.overrides.setYear(e,t):function(e,t){const n=m_(e,void 0);return isNaN(+n)?h_(e,NaN):(n.setFullYear(t),n)}(e,t)},this.startOfDay=e=>{var t;return null!=(t=this.overrides)&&t.startOfDay?this.overrides.startOfDay(e):k_(e)},this.startOfISOWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfISOWeek?this.overrides.startOfISOWeek(e):w_(e)},this.startOfMonth=e=>{var t;return null!=(t=this.overrides)&&t.startOfMonth?this.overrides.startOfMonth(e):function(e,t){const n=m_(e,null==t?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}(e)},this.startOfWeek=e=>{var t;return null!=(t=this.overrides)&&t.startOfWeek?this.overrides.startOfWeek(e,this.options):x_(e,this.options)},this.startOfYear=e=>{var t;return null!=(t=this.overrides)&&t.startOfYear?this.overrides.startOfYear(e):P_(e)},this.options={locale:z_,...e},this.overrides=t}}new aS;(0,f.createContext)(void 0);Symbol.toStringTag;Symbol.toStringTag;const sS={},lS={};function cS(e,t){try{const n=(sS[e]||(sS[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return n in lS?lS[n]:fS(n,n.split(":"))}catch{if(e in lS)return lS[e];const t=null==e?void 0:e.match(uS);return t?fS(e,t.slice(1)):NaN}}const uS=/([+-]\d\d):?(\d\d)?/;function fS(e,t){const n=+t[0],r=+(t[1]||0);return lS[e]=n>0?60*n+r:60*n-r}class dS extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(cS(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),mS(this),hS(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new dS(...t,e):new dS(Date.now(),e)}withTimeZone(e){return new dS(+this,e)}getTimezoneOffset(){return-cS(this.timeZone,this)}setTime(e){return Date.prototype.setTime.apply(this,arguments),hS(this),+this}[Symbol.for("constructDateFrom")](e){return new dS(+new Date(e),this.timeZone)}}const pS=/^(get|set)(?!UTC)/;function hS(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function mS(e){const t=cS(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=r- -new Date(+n).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();o&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+o);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const s=cS(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-s-a;if(s!==t&&l){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+l);const t=s-cS(e.timeZone,e);t&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+t),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+t))}}Object.getOwnPropertyNames(Date.prototype).forEach((e=>{if(!pS.test(e))return;const t=e.replace(pS,"$1UTC");dS.prototype[t]&&(e.startsWith("get")?dS.prototype[e]=function(){return this.internal[t]()}:(dS.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),mS(e)}(this),+this},dS.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),hS(this),+this}))})),Symbol.for("constructDateFrom");Symbol.toStringTag;const yS=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:r=!1,children:o,className:i})=>{const[a,s]=(0,f.useState)(Array.isArray(t)?t:[t]);return(0,u.jsx)("div",{className:ve("boxed"===e?"space-y-3":"",i),children:f.Children.map(o,(t=>f.isValidElement(t)&&"value"in t.props?f.cloneElement(t,{isOpen:a.includes(t.props.value),onToggle:()=>(e=>{s((t=>n?t.includes(e)?[]:[e]:t.includes(e)?t.filter((t=>t!==e)):[...t,e]))})(t.props.value),type:e,disabled:r||t.props.disabled}):t))})};yS.displayName="Accordion";const gS=({isOpen:e,onToggle:t,type:n="simple",disabled:r=!1,children:o,className:i})=>{const a={simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[n];return(0,u.jsx)("div",{className:ve(a,i),children:f.Children.map(o,(o=>f.isValidElement(o)?f.cloneElement(o,{isOpen:e,onToggle:t,type:n,disabled:r}):o))})};gS.displayName="Accordion.Item";const vS=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:o="h3",type:i="simple",children:a,className:s,...l})=>{const c={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[i];return(0,u.jsx)(o,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,u.jsxs)("button",{className:ve("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",c,r&&"cursor-not-allowed opacity-40",s),onClick:r?()=>{}:e,"aria-expanded":t,disabled:r,...l,children:[(0,u.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),"arrow"===n?(0,u.jsx)(Ie,{className:ve("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):"plus-minus"===n?(0,u.jsx)(dd.span,{initial:{opacity:0,rotate:t?-180:0},animate:{opacity:1,rotate:t?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary",children:t?(0,u.jsx)(Ve,{}):(0,u.jsx)(Ke,{})},t?"minus":"plus"):null]})})};vS.displayName="Accordion.Trigger";const bS=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:o})=>{const i={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return(0,u.jsx)(bd,{initial:!1,children:e&&(0,u.jsx)(dd.div,{variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:ve("overflow-hidden text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",o),"aria-hidden":!e,children:(0,u.jsx)("div",{className:ve(i),children:r})},"content")})};bS.displayName="Accordion.Content",Object.assign(yS,{Item:gS,Trigger:vS,Content:bS});var xS=Array.isArray,wS="object"==typeof h&&h&&h.Object===Object&&h,_S=wS,SS="object"==typeof self&&self&&self.Object===Object&&self,OS=_S||SS||Function("return this")(),kS=OS.Symbol,jS=kS,ES=Object.prototype,PS=ES.hasOwnProperty,CS=ES.toString,TS=jS?jS.toStringTag:void 0,AS=Object.prototype.toString,MS=function(e){var t=PS.call(e,TS),n=e[TS];try{e[TS]=void 0;var r=!0}catch{}var o=CS.call(e);return r&&(t?e[TS]=n:delete e[TS]),o},NS=function(e){return AS.call(e)},DS=kS?kS.toStringTag:void 0,IS=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":DS&&DS in Object(e)?MS(e):NS(e)},RS=function(e){return null!=e&&"object"==typeof e},LS=IS,zS=RS,BS=function(e){return"symbol"==typeof e||zS(e)&&"[object Symbol]"==LS(e)},FS=xS,WS=BS,VS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$S=/^\w*$/,US=function(e,t){if(FS(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!WS(e))||$S.test(e)||!VS.test(e)||null!=t&&e in Object(t)},KS=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const qS=m(KS);var HS=IS,YS=KS,XS=function(e){if(!YS(e))return!1;var t=HS(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const GS=m(XS);var ZS=OS["__core-js_shared__"],JS=function(){var e=/[^.]+$/.exec(ZS&&ZS.keys&&ZS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),QS=Function.prototype.toString,eO=function(e){if(null!=e){try{return QS.call(e)}catch{}try{return e+""}catch{}}return""},tO=XS,nO=function(e){return!!JS&&JS in e},rO=KS,oO=eO,iO=/^\[object .+?Constructor\]$/,aO=Function.prototype,sO=Object.prototype,lO=aO.toString,cO=sO.hasOwnProperty,uO=RegExp("^"+lO.call(cO).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fO=function(e){return!(!rO(e)||nO(e))&&(tO(e)?uO:iO).test(oO(e))},dO=function(e,t){return null==e?void 0:e[t]},pO=function(e,t){var n=dO(e,t);return fO(n)?n:void 0},hO=pO(Object,"create"),mO=hO,yO=hO,gO=Object.prototype.hasOwnProperty,vO=hO,bO=Object.prototype.hasOwnProperty,xO=hO,wO=function(){this.__data__=mO?mO(null):{},this.size=0},_O=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},SO=function(e){var t=this.__data__;if(yO){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return gO.call(t,e)?t[e]:void 0},OO=function(e){var t=this.__data__;return vO?void 0!==t[e]:bO.call(t,e)},kO=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=xO&&void 0===t?"__lodash_hash_undefined__":t,this};function jO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}jO.prototype.clear=wO,jO.prototype.delete=_O,jO.prototype.get=SO,jO.prototype.has=OO,jO.prototype.set=kO;var EO=jO,PO=function(e,t){return e===t||e!=e&&t!=t},CO=PO,TO=function(e,t){for(var n=e.length;n--;)if(CO(e[n][0],t))return n;return-1},AO=TO,MO=Array.prototype.splice,NO=TO,DO=TO,IO=TO,RO=function(){this.__data__=[],this.size=0},LO=function(e){var t=this.__data__,n=AO(t,e);return!(n<0||(n==t.length-1?t.pop():MO.call(t,n,1),--this.size,0))},zO=function(e){var t=this.__data__,n=NO(t,e);return n<0?void 0:t[n][1]},BO=function(e){return DO(this.__data__,e)>-1},FO=function(e,t){var n=this.__data__,r=IO(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function WO(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}WO.prototype.clear=RO,WO.prototype.delete=LO,WO.prototype.get=zO,WO.prototype.has=BO,WO.prototype.set=FO;var VO=WO,$O=pO(OS,"Map"),UO=EO,KO=VO,qO=$O,HO=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},YO=function(e,t){var n=e.__data__;return HO(t)?n["string"==typeof t?"string":"hash"]:n.map},XO=YO,GO=YO,ZO=YO,JO=YO,QO=function(e){var t=XO(this,e).delete(e);return this.size-=t?1:0,t},ek=function(e){return GO(this,e).get(e)},tk=function(e){return ZO(this,e).has(e)},nk=function(e,t){var n=JO(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function rk(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}rk.prototype.clear=function(){this.size=0,this.__data__={hash:new UO,map:new(qO||KO),string:new UO}},rk.prototype.delete=QO,rk.prototype.get=ek,rk.prototype.has=tk,rk.prototype.set=nk;var ok=rk,ik=ok;function ak(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(ak.Cache||ik),n}ak.Cache=ik;var sk=ak;const lk=m(sk);var ck=sk,uk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fk=/\\(\\)?/g,dk=function(e){var t=ck(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(uk,(function(e,n,r,o){t.push(r?o.replace(fk,"$1"):n||e)})),t})),pk=dk,hk=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},mk=hk,yk=xS,gk=BS,vk=kS?kS.prototype:void 0,bk=vk?vk.toString:void 0,xk=function e(t){if("string"==typeof t)return t;if(yk(t))return mk(t,e)+"";if(gk(t))return bk?bk.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},wk=function(e){return null==e?"":xk(e)},_k=xS,Sk=US,Ok=pk,kk=wk,jk=function(e,t){return _k(e)?e:Sk(e,t)?[e]:Ok(kk(e))},Ek=BS,Pk=function(e){if("string"==typeof e||Ek(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},Ck=jk,Tk=Pk,Ak=function(e,t){for(var n=0,r=(t=Ck(t,e)).length;null!=e&&n<r;)e=e[Tk(t[n++])];return n&&n==r?e:void 0},Mk=Ak,Nk=function(e,t,n){var r=null==e?void 0:Mk(e,t);return void 0===r?n:r};const Dk=m(Nk);var Ik=function(e){return null==e};const Rk=m(Ik);var Lk=IS,zk=xS,Bk=RS,Fk=function(e){return"string"==typeof e||!zk(e)&&Bk(e)&&"[object String]"==Lk(e)};const Wk=m(Fk);var Vk,$k={exports:{}},Uk={};$k.exports=function(){if(Vk)return Uk;Vk=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case u:case f:return e;default:switch(e=e&&e.$$typeof){case l:case s:case c:case p:case d:case a:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Uk.ContextConsumer=s,Uk.ContextProvider=a,Uk.Element=t,Uk.ForwardRef=c,Uk.Fragment=r,Uk.Lazy=p,Uk.Memo=d,Uk.Portal=n,Uk.Profiler=i,Uk.StrictMode=o,Uk.Suspense=u,Uk.SuspenseList=f,Uk.isAsyncMode=function(){return!1},Uk.isConcurrentMode=function(){return!1},Uk.isContextConsumer=function(e){return m(e)===s},Uk.isContextProvider=function(e){return m(e)===a},Uk.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Uk.isForwardRef=function(e){return m(e)===c},Uk.isFragment=function(e){return m(e)===r},Uk.isLazy=function(e){return m(e)===p},Uk.isMemo=function(e){return m(e)===d},Uk.isPortal=function(e){return m(e)===n},Uk.isProfiler=function(e){return m(e)===i},Uk.isStrictMode=function(e){return m(e)===o},Uk.isSuspense=function(e){return m(e)===u},Uk.isSuspenseList=function(e){return m(e)===f},Uk.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===u||t===f||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===e||void 0!==t.getModuleId)},Uk.typeOf=m,Uk}();var Kk=$k.exports,qk=IS,Hk=RS,Yk=function(e){return"number"==typeof e||Hk(e)&&"[object Number]"==qk(e)};const Xk=m(Yk);var Gk=Yk,Zk=function(e){return Gk(e)&&e!=+e};const Jk=m(Zk);var Qk=function(e){return 0===e?0:e>0?1:-1},ej=function(e){return Wk(e)&&e.indexOf("%")===e.length-1},tj=function(e){return Xk(e)&&!Jk(e)},nj=function(e){return tj(e)||Wk(e)},rj=0,oj=function(e){var t=++rj;return"".concat(e||"").concat(t)},ij=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!tj(e)&&!Wk(e))return r;if(ej(e)){var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return Jk(n)&&(n=r),o&&n>t&&(n=t),n},aj=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},sj=function(e,t){return tj(e)&&tj(t)?function(n){return e+n*(t-e)}:function(){return t}};function lj(e,t,n){return e&&e.length?e.find((function(e){return e&&("function"==typeof t?t(e):Dk(e,t))===n})):null}function cj(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function uj(e){return(uj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fj=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],dj=["points","pathLength"],pj={svg:["viewBox","children"],polygon:dj,polyline:dj},hj=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],mj=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,f.isValidElement)(e)&&(n=e.props),!qS(n))return null;var r={};return Object.keys(n).forEach((function(e){hj.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})})),r},yj=function(e,t,n){if(!qS(e)||"object"!==uj(e))return null;var r=null;return Object.keys(e).forEach((function(o){var i=e[o];hj.includes(o)&&"function"==typeof i&&(r||(r={}),r[o]=function(e,t,n){return function(r){return e(t,n,r),null}}(i,t,n))})),r},gj=["children"],vj=["children"];function bj(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function xj(e){return(xj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var wj={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},_j=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},Sj=null,Oj=null,kj=function e(t){if(t===Sj&&Array.isArray(Oj))return Oj;var n=[];return f.Children.forEach(t,(function(t){Rk(t)||(Kk.isFragment(t)?n=n.concat(e(t.props.children)):n.push(t))})),Oj=n,Sj=t,n};function jj(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map((function(e){return _j(e)})):[_j(t)],kj(e).forEach((function(e){var t=Dk(e,"type.displayName")||Dk(e,"type.name");-1!==r.indexOf(t)&&n.push(e)})),n}function Ej(e,t){var n=jj(e,t);return n&&n[0]}var Pj=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!tj(n)||n<=0||!tj(r)||r<=0)},Cj=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Tj=function(e){return e&&"object"===xj(e)&&"clipDot"in e},Aj=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,f.isValidElement)(e)&&(r=e.props),!qS(r))return null;var o={};return Object.keys(r).forEach((function(e){var i;(function(e,t,n,r){var o,i=null!==(o=null==pj?void 0:pj[r])&&void 0!==o?o:[];return!GS(e)&&(r&&i.includes(t)||fj.includes(t))||n&&hj.includes(t)})(null===(i=r)||void 0===i?void 0:i[e],e,t,n)&&(o[e]=r[e])})),o},Mj=function e(t,n){if(t===n)return!0;var r=f.Children.count(t);if(r!==f.Children.count(n))return!1;if(0===r)return!0;if(1===r)return Nj(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var i=t[o],a=n[o];if(Array.isArray(i)||Array.isArray(a)){if(!e(i,a))return!1}else if(!Nj(i,a))return!1}return!0},Nj=function(e,t){if(Rk(e)&&Rk(t))return!0;if(!Rk(e)&&!Rk(t)){var n=e.props||{},r=n.children,o=bj(n,gj),i=t.props||{},a=i.children,s=bj(i,vj);return r&&a?cj(o,s)&&Mj(r,a):!r&&!a&&cj(o,s)}return!1},Dj=function(e,t){var n=[],r={};return kj(e).forEach((function(e,o){if(function(e){return e&&e.type&&Wk(e.type)&&Cj.indexOf(e.type)>=0}(e))n.push(e);else if(e){var i=_j(e.type),a=t[i]||{},s=a.handler,l=a.once;if(s&&(!l||!r[i])){var c=s(e,i,o);n.push(c),r[i]=!0}}})),n},Ij=function(e,t){return kj(t).indexOf(e)},Rj=["children","width","height","viewBox","className","style","title","desc"];function Lj(){return Lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lj.apply(this,arguments)}function zj(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Rj),u=o||{width:n,height:r,x:0,y:0},d=ge("recharts-surface",i);return f.createElement("svg",Lj({},Aj(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),f.createElement("title",null,s),f.createElement("desc",null,l),t)}var Bj=["children","className"];function Fj(){return Fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fj.apply(this,arguments)}var Wj=f.forwardRef((function(e,t){var n=e.children,r=e.className,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Bj),i=ge("recharts-layer",r);return f.createElement("g",Fj({className:i},Aj(o,!0),{ref:t}),n)})),Vj=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]},$j=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i},Uj=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Kj=function(e){return Uj.test(e)},qj="\\ud800-\\udfff",Hj="["+qj+"]",Yj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Xj="\\ud83c[\\udffb-\\udfff]",Gj="[^"+qj+"]",Zj="(?:\\ud83c[\\udde6-\\uddff]){2}",Jj="[\\ud800-\\udbff][\\udc00-\\udfff]",Qj="(?:"+Yj+"|"+Xj+")?",eE="[\\ufe0e\\ufe0f]?",tE=eE+Qj+"(?:\\u200d(?:"+[Gj,Zj,Jj].join("|")+")"+eE+Qj+")*",nE="(?:"+[Gj+Yj+"?",Yj,Zj,Jj,Hj].join("|")+")",rE=RegExp(Xj+"(?="+Xj+")|"+nE+tE,"g"),oE=function(e){return e.split("")},iE=Kj,aE=function(e){return e.match(rE)||[]},sE=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:$j(e,t,n)},lE=Kj,cE=function(e){return iE(e)?aE(e):oE(e)},uE=wk;const fE=m(function(e){return function(t){t=uE(t);var n=lE(t)?cE(t):void 0,r=n?n[0]:t.charAt(0),o=n?sE(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"));function dE(e){return function(){return e}}const pE=Math.cos,hE=Math.sin,mE=Math.sqrt,yE=Math.PI,gE=2*yE,vE=Math.PI,bE=2*vE,xE=1e-6,wE=bE-xE;function _E(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class SE{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?_E:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return _E;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,f=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(f>xE)if(Math.abs(u*s-l*c)>xE&&o){let d=n-i,p=r-a,h=s*s+l*l,m=d*d+p*p,y=Math.sqrt(h),g=Math.sqrt(f),v=o*Math.tan((vE-Math.acos((h+f-m)/(2*y*g)))/2),b=v/g,x=v/y;Math.abs(b-1)>xE&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*d>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,f=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>xE||Math.abs(this._y1-c)>xE)&&this._append`L${l},${c}`,n&&(f<0&&(f=f%bE+bE),f>wE?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:f>xE&&this._append`A${n},${n},0,${+(f>=vE)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function OE(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new SE(t)}function kE(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jE(e){this._context=e}function EE(e){return new jE(e)}function PE(e){return e[0]}function CE(e){return e[1]}function TE(e,t){var n=dE(!0),r=null,o=EE,i=null,a=OE(s);function s(s){var l,c,u,f=(s=kE(s)).length,d=!1;for(null==r&&(i=o(u=a())),l=0;l<=f;++l)!(l<f&&n(c=s[l],l,s))===d&&((d=!d)?i.lineStart():i.lineEnd()),d&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?PE:dE(e),t="function"==typeof t?t:void 0===t?CE:dE(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:dE(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:dE(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:dE(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}function AE(e,t,n){var r=null,o=dE(!0),i=null,a=EE,s=null,l=OE(c);function c(c){var u,f,d,p,h,m=(c=kE(c)).length,y=!1,g=new Array(m),v=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===y)if(y=!y)f=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=u-1;d>=f;--d)s.point(g[d],v[d]);s.lineEnd(),s.areaEnd()}y&&(g[u]=+e(p,u,c),v[u]=+t(p,u,c),s.point(r?+r(p,u,c):g[u],n?+n(p,u,c):v[u]))}if(h)return s=null,h+""||null}function u(){return TE().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?PE:dE(+e),t="function"==typeof t?t:dE(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?CE:dE(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:dE(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:dE(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:dE(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:dE(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:dE(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:dE(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:dE(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}jE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};class ME{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}const NE={draw(e,t){const n=mE(t/yE);e.moveTo(n,0),e.arc(0,0,n,0,gE)}},DE={draw(e,t){const n=mE(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},IE=mE(1/3),RE=2*IE,LE={draw(e,t){const n=mE(t/RE),r=n*IE;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},zE={draw(e,t){const n=mE(t),r=-n/2;e.rect(r,r,n,n)}},BE=hE(yE/10)/hE(7*yE/10),FE=hE(gE/10)*BE,WE=-pE(gE/10)*BE,VE={draw(e,t){const n=mE(.8908130915292852*t),r=FE*n,o=WE*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=gE*t/5,a=pE(i),s=hE(i);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*o,s*r+a*o)}e.closePath()}},$E=mE(3),UE={draw(e,t){const n=-mE(t/(3*$E));e.moveTo(0,2*n),e.lineTo(-$E*n,-n),e.lineTo($E*n,-n),e.closePath()}},KE=-.5,qE=mE(3)/2,HE=1/mE(12),YE=3*(HE/2+1),XE={draw(e,t){const n=mE(t/YE),r=n/2,o=n*HE,i=r,a=n*HE+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(KE*r-qE*o,qE*r+KE*o),e.lineTo(KE*i-qE*a,qE*i+KE*a),e.lineTo(KE*s-qE*l,qE*s+KE*l),e.lineTo(KE*r+qE*o,KE*o-qE*r),e.lineTo(KE*i+qE*a,KE*a-qE*i),e.lineTo(KE*s+qE*l,KE*l-qE*s),e.closePath()}};function GE(){}function ZE(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function JE(e){this._context=e}function QE(e){this._context=e}function eP(e){this._context=e}function tP(e){this._context=e}function nP(e){return e<0?-1:1}function rP(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(nP(i)+nP(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function oP(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function iP(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function aP(e){this._context=e}function sP(e){this._context=new lP(e)}function lP(e){this._context=e}function cP(e){this._context=e}function uP(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function fP(e,t){this._context=e,this._t=t}function dP(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function pP(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function hP(e,t){return e[t]}function mP(e){const t=[];return t.key=e,t}function yP(e){return(yP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}JE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ZE(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ZE(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},QE.prototype={areaStart:GE,areaEnd:GE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ZE(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},eP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ZE(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},tP.prototype={areaStart:GE,areaEnd:GE,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},aP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:iP(this,this._t0,oP(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,iP(this,oP(this,n=rP(this,e,t)),n);break;default:iP(this,this._t0,n=rP(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(sP.prototype=Object.create(aP.prototype)).point=function(e,t){aP.prototype.point.call(this,t,e)},lP.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},cP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=uP(e),o=uP(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},fP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var gP=["type","size","sizeType"];function vP(){return vP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vP.apply(this,arguments)}function bP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bP(Object(n),!0).forEach((function(t){wP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wP(e,t,n){return t=function(e){var t=function(e){if("object"!=yP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yP(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _P={symbolCircle:NE,symbolCross:DE,symbolDiamond:LE,symbolSquare:zE,symbolStar:VE,symbolTriangle:UE,symbolWye:XE},SP=Math.PI/180,OP=function(e){var t,n,r=e.type,o=void 0===r?"circle":r,i=e.size,a=void 0===i?64:i,s=e.sizeType,l=void 0===s?"area":s,c=xP(xP({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,gP)),{},{type:o,size:a,sizeType:l}),u=c.className,d=c.cx,p=c.cy,h=Aj(c,!0);return d===+d&&p===+p&&a===+a?f.createElement("path",vP({},h,{className:ge("recharts-symbols",u),transform:"translate(".concat(d,", ").concat(p,")"),d:(t=function(e){var t="symbol".concat(fE(e));return _P[t]||NE}(o),n=function(e,t){let n=null,r=OE(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:dE(e||NE),t="function"==typeof t?t:dE(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:dE(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:dE(+e),o):t},o.context=function(e){return arguments.length?(n=e??null,o):n},o}().type(t).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*SP;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(a,l,o)),n())})):null};function kP(e){return(kP="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jP(){return jP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jP.apply(this,arguments)}function EP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PP(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(PP=function(){return!!e})()}function CP(e){return(CP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function TP(e,t){return(TP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function AP(e,t,n){return(t=MP(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MP(e){var t=function(e){if("object"!=kP(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kP(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kP(t)?t:t+""}OP.registerSymbol=function(e,t){_P["symbol".concat(fE(e))]=t};var NP=32,DP=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=CP(t),function(e,t){if(t&&("object"===kP(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,PP()?Reflect.construct(t,n||[],CP(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TP(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,MP(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=16,r=NP/6,o=NP/3,i=e.inactive?t:e.color;if("plainline"===e.type)return f.createElement("line",{strokeWidth:4,fill:"none",stroke:i,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:NP,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return f.createElement("path",{strokeWidth:4,fill:"none",stroke:i,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(NP,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return f.createElement("path",{stroke:"none",fill:i,d:"M0,".concat(4,"h").concat(NP,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(f.isValidElement(e.legendIcon)){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EP(Object(n),!0).forEach((function(t){AP(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EP(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete a.legendIcon,f.cloneElement(e.legendIcon,a)}return f.createElement(OP,{fill:i,cx:n,cy:n,size:NP,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,i=t.formatter,a=t.inactiveColor,s={x:0,y:0,width:NP,height:NP},l={display:"horizontal"===o?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map((function(t,n){var o=t.formatter||i,u=ge(AP(AP({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=GS(t.value)?null:t.value;Vj(!GS(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var p=t.inactive?a:t.color;return f.createElement("li",jP({className:u,style:l,key:"legend-item-".concat(n)},yj(e.props,t,n)),f.createElement(zj,{width:r,height:r,viewBox:s,style:c},e.renderIcon(t)),f.createElement("span",{className:"recharts-legend-item-text",style:{color:p}},o?o(d,t,n):d))}))}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return f.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(f.PureComponent);AP(DP,"displayName","Legend"),AP(DP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var IP=VO,RP=VO,LP=$O,zP=ok,BP=VO,FP=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},WP=function(e){return this.__data__.get(e)},VP=function(e){return this.__data__.has(e)},$P=function(e,t){var n=this.__data__;if(n instanceof RP){var r=n.__data__;if(!LP||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new zP(r)}return n.set(e,t),this.size=n.size,this};function UP(e){var t=this.__data__=new BP(e);this.size=t.size}UP.prototype.clear=function(){this.__data__=new IP,this.size=0},UP.prototype.delete=FP,UP.prototype.get=WP,UP.prototype.has=VP,UP.prototype.set=$P;var KP=UP,qP=ok,HP=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},YP=function(e){return this.__data__.has(e)};function XP(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qP;++t<n;)this.add(e[t])}XP.prototype.add=XP.prototype.push=HP,XP.prototype.has=YP;var GP=XP,ZP=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},JP=function(e,t){return e.has(t)},QP=GP,eC=ZP,tC=JP,nC=function(e,t,n,r,o,i){var a=1&n,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var f=-1,d=!0,p=2&n?new QP:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],m=t[f];if(r)var y=a?r(m,h,f,t,e,i):r(h,m,f,e,t,i);if(void 0!==y){if(y)continue;d=!1;break}if(p){if(!eC(t,(function(e,t){if(!tC(p,t)&&(h===e||o(h,e,n,r,i)))return p.push(t)}))){d=!1;break}}else if(h!==m&&!o(h,m,n,r,i)){d=!1;break}}return i.delete(e),i.delete(t),d},rC=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},oC=OS.Uint8Array,iC=PO,aC=nC,sC=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},lC=rC,cC=kS?kS.prototype:void 0,uC=cC?cC.valueOf:void 0,fC=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},dC=fC,pC=xS,hC=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i},mC=Object.prototype.propertyIsEnumerable,yC=Object.getOwnPropertySymbols,gC=yC?function(e){return null==e?[]:(e=Object(e),hC(yC(e),(function(t){return mC.call(e,t)})))}:function(){return[]},vC=gC,bC=IS,xC=RS,wC=function(e){return xC(e)&&"[object Arguments]"==bC(e)},_C=RS,SC=Object.prototype,OC=SC.hasOwnProperty,kC=SC.propertyIsEnumerable,jC=wC(function(){return arguments}())?wC:function(e){return _C(e)&&OC.call(e,"callee")&&!kC.call(e,"callee")},EC=jC,PC={exports:{}},CC=function(){return!1};!function(e,t){var n=OS,r=CC,o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;e.exports=s}(PC,PC.exports);var TC=PC.exports,AC=/^(?:0|[1-9]\d*)$/,MC=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&("number"==n||"symbol"!=n&&AC.test(e))&&e>-1&&e%1==0&&e<t},NC=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},DC=IS,IC=NC,RC=RS,LC={};LC["[object Float32Array]"]=LC["[object Float64Array]"]=LC["[object Int8Array]"]=LC["[object Int16Array]"]=LC["[object Int32Array]"]=LC["[object Uint8Array]"]=LC["[object Uint8ClampedArray]"]=LC["[object Uint16Array]"]=LC["[object Uint32Array]"]=!0,LC["[object Arguments]"]=LC["[object Array]"]=LC["[object ArrayBuffer]"]=LC["[object Boolean]"]=LC["[object DataView]"]=LC["[object Date]"]=LC["[object Error]"]=LC["[object Function]"]=LC["[object Map]"]=LC["[object Number]"]=LC["[object Object]"]=LC["[object RegExp]"]=LC["[object Set]"]=LC["[object String]"]=LC["[object WeakMap]"]=!1;var zC=function(e){return function(t){return e(t)}},BC={exports:{}};!function(e,t){var n=wS,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}();e.exports=a}(BC,BC.exports);var FC=BC.exports,WC=function(e){return RC(e)&&IC(e.length)&&!!LC[DC(e)]},VC=zC,$C=FC&&FC.isTypedArray,UC=$C?VC($C):WC,KC=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},qC=EC,HC=xS,YC=TC,XC=MC,GC=UC,ZC=Object.prototype.hasOwnProperty,JC=Object.prototype,QC=function(e,t){return function(n){return e(t(n))}},eT=QC(Object.keys,Object),tT=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||JC)},nT=eT,rT=Object.prototype.hasOwnProperty,oT=XS,iT=NC,aT=function(e){return null!=e&&iT(e.length)&&!oT(e)},sT=function(e,t){var n=HC(e),r=!n&&qC(e),o=!n&&!r&&YC(e),i=!n&&!r&&!o&&GC(e),a=n||r||o||i,s=a?KC(e.length,String):[],l=s.length;for(var c in e)(t||ZC.call(e,c))&&(!a||!("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||XC(c,l)))&&s.push(c);return s},lT=function(e){if(!tT(e))return nT(e);var t=[];for(var n in Object(e))rT.call(e,n)&&"constructor"!=n&&t.push(n);return t},cT=aT,uT=function(e){return cT(e)?sT(e):lT(e)},fT=function(e,t,n){var r=t(e);return pC(e)?r:dC(r,n(e))},dT=vC,pT=uT,hT=function(e){return fT(e,pT,dT)},mT=Object.prototype.hasOwnProperty,yT=pO(OS,"DataView"),gT=pO(OS,"Promise"),vT=pO(OS,"Set"),bT=yT,xT=$O,wT=gT,_T=vT,ST=pO(OS,"WeakMap"),OT=IS,kT=eO,jT="[object Map]",ET="[object Promise]",PT="[object Set]",CT="[object WeakMap]",TT="[object DataView]",AT=kT(bT),MT=kT(xT),NT=kT(wT),DT=kT(_T),IT=kT(ST),RT=OT;(bT&&RT(new bT(new ArrayBuffer(1)))!=TT||xT&&RT(new xT)!=jT||wT&&RT(wT.resolve())!=ET||_T&&RT(new _T)!=PT||ST&&RT(new ST)!=CT)&&(RT=function(e){var t=OT(e),n="[object Object]"==t?e.constructor:void 0,r=n?kT(n):"";if(r)switch(r){case AT:return TT;case MT:return jT;case NT:return ET;case DT:return PT;case IT:return CT}return t});var LT=KP,zT=nC,BT=function(e,t,n,r,o,i,a){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new oC(e),new oC(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return iC(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=sC;case"[object Set]":var l=1&r;if(s||(s=lC),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var u=aC(s(e),s(t),r,o,i,a);return a.delete(e),u;case"[object Symbol]":if(uC)return uC.call(e)==uC.call(t)}return!1},FT=function(e,t,n,r,o,i){var a=1&n,s=hT(e),l=s.length;if(l!=hT(t).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in t:mT.call(t,u)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++c<l;){var m=e[u=s[c]],y=t[u];if(r)var g=a?r(y,m,u,t,e,i):r(m,y,u,e,t,i);if(!(void 0===g?m===y||o(m,y,n,r,i):g)){p=!1;break}h||(h="constructor"==u)}if(p&&!h){var v=e.constructor,b=t.constructor;v!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(e),i.delete(t),p},WT=RT,VT=xS,$T=TC,UT=UC,KT="[object Arguments]",qT="[object Array]",HT="[object Object]",YT=Object.prototype.hasOwnProperty,XT=function(e,t,n,r,o,i){var a=VT(e),s=VT(t),l=a?qT:WT(e),c=s?qT:WT(t),u=(l=l==KT?HT:l)==HT,f=(c=c==KT?HT:c)==HT,d=l==c;if(d&&$T(e)){if(!$T(t))return!1;a=!0,u=!1}if(d&&!u)return i||(i=new LT),a||UT(e)?zT(e,t,n,r,o,i):BT(e,t,l,n,r,o,i);if(!(1&n)){var p=u&&YT.call(e,"__wrapped__"),h=f&&YT.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,y=h?t.value():t;return i||(i=new LT),o(m,y,n,r,i)}}return!!d&&(i||(i=new LT),FT(e,t,n,r,o,i))},GT=RS,ZT=function e(t,n,r,o,i){return t===n||(null==t||null==n||!GT(t)&&!GT(n)?t!=t&&n!=n:XT(t,n,r,o,e,i))},JT=KP,QT=ZT,eA=KS,tA=function(e){return e==e&&!eA(e)},nA=tA,rA=uT,oA=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}},iA=function(e,t,n,r){var o=n.length,i=o,a=!r;if(null==e)return!i;for(e=Object(e);o--;){var s=n[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var l=(s=n[o])[0],c=e[l],u=s[1];if(a&&s[2]){if(void 0===c&&!(l in e))return!1}else{var f=new JT;if(r)var d=r(c,u,l,e,t,f);if(!(void 0===d?QT(u,c,3,r,f):d))return!1}}return!0},aA=function(e){for(var t=rA(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,nA(o)]}return t},sA=oA,lA=jk,cA=EC,uA=xS,fA=MC,dA=NC,pA=Pk,hA=function(e,t){return null!=e&&t in Object(e)},mA=function(e,t,n){for(var r=-1,o=(t=lA(t,e)).length,i=!1;++r<o;){var a=pA(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&dA(o)&&fA(a,o)&&(uA(e)||cA(e))},yA=ZT,gA=Nk,vA=function(e,t){return null!=e&&mA(e,t,hA)},bA=US,xA=tA,wA=oA,_A=Pk,SA=function(e){return e},OA=Ak,kA=function(e){return function(t){return null==t?void 0:t[e]}},jA=function(e){return function(t){return OA(t,e)}},EA=US,PA=Pk,CA=function(e){var t=aA(e);return 1==t.length&&t[0][2]?sA(t[0][0],t[0][1]):function(n){return n===e||iA(n,e,t)}},TA=function(e,t){return bA(e)&&xA(t)?wA(_A(e),t):function(n){var r=gA(n,e);return void 0===r&&r===t?vA(n,e):yA(t,r,3)}},AA=SA,MA=xS,NA=function(e){return EA(e)?kA(PA(e)):jA(e)},DA=function(e){return"function"==typeof e?e:null==e?AA:"object"==typeof e?MA(e)?TA(e[0],e[1]):CA(e):NA(e)},IA=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1},RA=IA,LA=function(e){return e!=e},zA=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1},BA=function(e,t,n){return t==t?zA(e,t,n):RA(e,LA,n)},FA=vT,WA=FA&&1/rC(new FA([,-0]))[1]==1/0?function(e){return new FA(e)}:function(){},VA=GP,$A=function(e,t){return!(null==e||!e.length)&&BA(e,t,0)>-1},UA=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},KA=JP,qA=WA,HA=rC,YA=DA,XA=function(e,t,n){var r=-1,o=$A,i=e.length,a=!0,s=[],l=s;if(n)a=!1,o=UA;else if(i>=200){var c=t?null:qA(e);if(c)return HA(c);a=!1,o=KA,l=new VA}else l=t?[]:s;e:for(;++r<i;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,a&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),s.push(u)}else o(l,f,n)||(l!==s&&l.push(f),s.push(u))}return s},GA=function(e,t){return e&&e.length?XA(e,YA(t)):[]};const ZA=m(GA);function JA(e,t,n){return!0===t?ZA(e,n):GS(t)?ZA(e,t):e}function QA(e){return(QA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var eM=["ref"];function tM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tM(Object(n),!0).forEach((function(t){sM(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tM(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function rM(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lM(r.key),r)}}function oM(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(oM=function(){return!!e})()}function iM(e){return(iM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function aM(e,t){return(aM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sM(e,t,n){return(t=lM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lM(e){var t=function(e){if("object"!=QA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=QA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==QA(t)?t:t+""}function cM(e){return e.value}var uM=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return sM(e=function(e,t,n){return t=iM(t),function(e,t){if(t&&("object"===QA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,oM()?Reflect.construct(t,n||[],iM(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aM(e,t)}(t,e),function(e,t,n){return t&&rM(e.prototype,t),n&&rM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):(-1!==this.lastBoundingBox.width||-1!==this.lastBoundingBox.height)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?nM({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,i=r.align,a=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===i&&"vertical"===o?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===i?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),nM(nM({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,i=t.wrapperStyle,a=t.payloadUniqBy,s=t.payload,l=nM(nM({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(i)),i);return f.createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(f.isValidElement(e))return f.cloneElement(e,t);if("function"==typeof e)return f.createElement(e,t);t.ref;var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,eM);return f.createElement(DP,n)}(n,nM(nM({},this.props),{},{payload:JA(s,a,cM)})))}}],[{key:"getWithHeight",value:function(e,t){var n=nM(nM({},this.defaultProps),e.props).layout;return"vertical"===n&&tj(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}])}(f.PureComponent);sM(uM,"displayName","Legend"),sM(uM,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var fM=EC,dM=xS,pM=kS?kS.isConcatSpreadable:void 0,hM=fC,mM=function(e){return dM(e)||fM(e)||!!(pM&&e&&e[pM])},yM=function e(t,n,r,o,i){var a=-1,s=t.length;for(r||(r=mM),i||(i=[]);++a<s;){var l=t[a];n>0&&r(l)?n>1?e(l,n-1,r,o,i):hM(i,l):o||(i[i.length]=l)}return i},gM=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(!1===n(i[l],l,i))break}return t}}(),vM=uT,bM=function(e,t){return e&&gM(e,t,vM)},xM=aT,wM=function(e,t){return function(n,r){if(null==n)return n;if(!xM(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}(bM),_M=wM,SM=aT,OM=function(e,t){var n=-1,r=SM(e)?Array(e.length):[];return _M(e,(function(e,o,i){r[++n]=t(e,o,i)})),r},kM=BS,jM=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,o=e==e,i=kM(e),a=void 0!==t,s=null===t,l=t==t,c=kM(t);if(!s&&!c&&!i&&e>t||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e<t||c&&n&&o&&!r&&!i||s&&n&&o||!a&&o||!l)return-1}return 0},EM=hk,PM=Ak,CM=DA,TM=OM,AM=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e},MM=zC,NM=function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,s=n.length;++r<a;){var l=jM(o[r],i[r]);if(l)return r>=s?l:l*("desc"==n[r]?-1:1)}return e.index-t.index},DM=SA,IM=xS,RM=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},LM=Math.max,zM=pO,BM=function(){try{var e=zM(Object,"defineProperty");return e({},"",{}),e}catch{}}(),FM=BM,WM=function(e){return function(){return e}},VM=FM,$M=VM?function(e,t){return VM(e,"toString",{configurable:!0,enumerable:!1,value:WM(t),writable:!0})}:SA,UM=$M,KM=Date.now,qM=function(e){var t=0,n=0;return function(){var r=KM(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(UM),HM=SA,YM=function(e,t,n){return t=LM(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=LM(r.length-t,0),a=Array(i);++o<i;)a[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(a),RM(e,this,s)}},XM=qM,GM=PO,ZM=aT,JM=MC,QM=KS,eN=function(e,t,n){if(!QM(n))return!1;var r=typeof t;return!!("number"==r?ZM(n)&&JM(t,n.length):"string"==r&&t in n)&&GM(n[t],e)},tN=yM,nN=function(e,t,n){t=t.length?EM(t,(function(e){return IM(e)?function(t){return PM(t,1===e.length?e[0]:e)}:e})):[DM];var r=-1;t=EM(t,MM(CM));var o=TM(e,(function(e,n,o){return{criteria:EM(t,(function(t){return t(e)})),index:++r,value:e}}));return AM(o,(function(e,t){return NM(e,t,n)}))},rN=eN,oN=function(e,t){return XM(YM(e,t,HM),e+"")}((function(e,t){if(null==e)return[];var n=t.length;return n>1&&rN(e,t[0],t[1])?t=[]:n>2&&rN(t[0],t[1],t[2])&&(t=[t[0]]),nN(e,tN(t,1),[])}));const iN=m(oN);function aN(e){return(aN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sN(){return sN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sN.apply(this,arguments)}function lN(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cN(Object(n),!0).forEach((function(t){fN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fN(e,t,n){return t=function(e){var t=function(e){if("object"!=aN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aN(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dN(e){return Array.isArray(e)&&nj(e[0])&&nj(e[1])?e.join(" ~ "):e}var pN=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,i=e.itemStyle,a=void 0===i?{}:i,s=e.labelStyle,l=void 0===s?{}:s,c=e.payload,u=e.formatter,d=e.itemSorter,p=e.wrapperClassName,h=e.labelClassName,m=e.label,y=e.labelFormatter,g=e.accessibilityLayer,v=void 0!==g&&g,b=uN({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),x=uN({margin:0},l),w=!Rk(m),_=w?m:"",S=ge("recharts-default-tooltip",p),O=ge("recharts-tooltip-label",h);w&&y&&null!=c&&(_=y(m,c));var k=v?{role:"status","aria-live":"assertive"}:{};return f.createElement("div",sN({className:S,style:b},k),f.createElement("p",{className:O,style:x},f.isValidElement(_)?_:"".concat(_)),function(){if(c&&c.length){var e=(d?iN(c,d):c).map((function(e,t){if("none"===e.type)return null;var r=uN({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},a),o=e.formatter||u||dN,i=e.value,s=e.name,l=i,d=s;if(o&&null!=l&&null!=d){var p=o(i,s,e,t,c);if(Array.isArray(p)){var h=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lN(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(p,2);l=h[0],d=h[1]}else l=p}return f.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},nj(d)?f.createElement("span",{className:"recharts-tooltip-item-name"},d):null,nj(d)?f.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,f.createElement("span",{className:"recharts-tooltip-item-value"},l),f.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))}));return f.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function hN(e){return(hN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mN(e,t,n){return t=function(e){var t=function(e){if("object"!=hN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hN(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yN="recharts-tooltip-wrapper",gN={visibility:"hidden"};function vN(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ge(yN,mN(mN(mN(mN({},"".concat(yN,"-right"),tj(n)&&t&&tj(t.x)&&n>=t.x),"".concat(yN,"-left"),tj(n)&&t&&tj(t.x)&&n<t.x),"".concat(yN,"-bottom"),tj(r)&&t&&tj(t.y)&&r>=t.y),"".concat(yN,"-top"),tj(r)&&t&&tj(t.y)&&r<t.y))}function bN(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,i=e.position,a=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(i&&tj(i[r]))return i[r];var u=n[r]-s-o,f=n[r]+o;return t[r]?a[r]?u:f:a[r]?u<l[r]?Math.max(f,l[r]):Math.max(u,l[r]):f+s>l[r]+c?Math.max(u,l[r]):Math.max(f,l[r])}function xN(e){return(xN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wN(Object(n),!0).forEach((function(t){jN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function SN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(SN=function(){return!!e})()}function ON(e){return(ON=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function kN(e,t){return(kN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jN(e,t,n){return(t=EN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EN(e){var t=function(e){if("object"!=xN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xN(t)?t:t+""}var PN=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return jN(e=function(e,t,n){return t=ON(t),function(e,t){if(t&&("object"===xN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,SN()?Reflect.construct(t,n||[],ON(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),jN(e,"handleKeyDown",(function(t){var n,r,o,i;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.props.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kN(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EN(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else(-1!==this.state.lastBoundingBox.width||-1!==this.state.lastBoundingBox.height)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)!==this.state.dismissedAtCoordinate.x||(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.children,s=t.coordinate,l=t.hasPayload,c=t.isAnimationActive,u=t.offset,d=t.position,p=t.reverseDirection,h=t.useTranslate3d,m=t.viewBox,y=t.wrapperStyle,g=function(e){var t,n,r,o=e.allowEscapeViewBox,i=e.coordinate,a=e.offsetTopLeft,s=e.position,l=e.reverseDirection,c=e.tooltipBox,u=e.useTranslate3d,f=e.viewBox;return t=c.height>0&&c.width>0&&i?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=bN({allowEscapeViewBox:o,coordinate:i,key:"x",offsetTopLeft:a,position:s,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),translateY:r=bN({allowEscapeViewBox:o,coordinate:i,key:"y",offsetTopLeft:a,position:s,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),useTranslate3d:u}):gN,{cssProperties:t,cssClasses:vN({translateX:n,translateY:r,coordinate:i})}}({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:p,tooltipBox:this.state.lastBoundingBox,useTranslate3d:h,viewBox:m}),v=g.cssClasses,b=g.cssProperties,x=_N(_N({transition:c&&n?"transform ".concat(o,"ms ").concat(i):void 0},b),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&l?"visible":"hidden",position:"absolute",top:0,left:0},y);return f.createElement("div",{tabIndex:-1,className:v,style:x,ref:function(t){e.wrapperNode=t}},a)}}])}(f.PureComponent),CN={isSsr:!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return CN[e]},set:function(e,t){if("string"==typeof e)CN[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach((function(t){CN[t]=e[t]}))}}};function TN(e){return(TN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AN(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function MN(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AN(Object(n),!0).forEach((function(t){RN(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AN(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function NN(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(NN=function(){return!!e})()}function DN(e){return(DN=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function IN(e,t){return(IN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function RN(e,t,n){return(t=LN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LN(e){var t=function(e){if("object"!=TN(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=TN(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==TN(t)?t:t+""}function zN(e){return e.dataKey}var BN=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=DN(t),function(e,t){if(t&&("object"===TN(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,NN()?Reflect.construct(t,n||[],DN(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IN(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LN(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,i=t.animationEasing,a=t.content,s=t.coordinate,l=t.filterNull,c=t.isAnimationActive,u=t.offset,d=t.payload,p=t.payloadUniqBy,h=t.position,m=t.reverseDirection,y=t.useTranslate3d,g=t.viewBox,v=t.wrapperStyle,b=d??[];l&&b.length&&(b=JA(d.filter((function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)})),p,zN));var x=b.length>0;return f.createElement(PN,{allowEscapeViewBox:r,animationDuration:o,animationEasing:i,isAnimationActive:c,active:n,coordinate:s,hasPayload:x,offset:u,position:h,reverseDirection:m,useTranslate3d:y,viewBox:g,wrapperStyle:v},function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):"function"==typeof e?f.createElement(e,t):f.createElement(pN,t)}(a,MN(MN({},this.props),{},{payload:b})))}}])}(f.PureComponent);RN(BN,"displayName","Tooltip"),RN(BN,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!CN.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var FN=OS,WN=/\s/,VN=function(e){for(var t=e.length;t--&&WN.test(e.charAt(t)););return t},$N=/^\s+/,UN=function(e){return e&&e.slice(0,VN(e)+1).replace($N,"")},KN=KS,qN=BS,HN=/^[-+]0x[0-9a-f]+$/i,YN=/^0b[01]+$/i,XN=/^0o[0-7]+$/i,GN=parseInt,ZN=function(e){if("number"==typeof e)return e;if(qN(e))return NaN;if(KN(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=KN(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=UN(e);var n=YN.test(e);return n||XN.test(e)?GN(e.slice(2),n?2:8):HN.test(e)?NaN:+e},JN=KS,QN=function(){return FN.Date.now()},eD=ZN,tD=Math.max,nD=Math.min,rD=function(e,t,n){var r,o,i,a,s,l,c=0,u=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(t){var n=r,i=o;return r=o=void 0,c=t,a=e.apply(i,n)}function h(e){var n=e-l;return void 0===l||n>=t||n<0||f&&e-c>=i}function m(){var e=QN();if(h(e))return y(e);s=setTimeout(m,function(e){var n=t-(e-l);return f?nD(n,i-(e-c)):n}(e))}function y(e){return s=void 0,d&&r?p(e):(r=o=void 0,a)}function g(){var e=QN(),n=h(e);if(r=arguments,o=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?p(e):a}(l);if(f)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=eD(t)||0,JN(n)&&(u=!!n.leading,i=(f="maxWait"in n)?tD(eD(n.maxWait)||0,t):i,d="trailing"in n?!!n.trailing:d),g.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=o=s=void 0},g.flush=function(){return void 0===s?a:y(QN())},g},oD=KS,iD=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return oD(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),rD(e,t,{leading:r,maxWait:t,trailing:o})};const aD=m(iD);var sD=function(e){return null};function lD(e){return(lD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cD(Object(n),!0).forEach((function(t){fD(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cD(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fD(e,t,n){return t=function(e){var t=function(e){if("object"!=lD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lD(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}sD.displayName="Cell";var dD={widthCache:{},cacheCount:0},pD={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},hD="recharts_measurement_span",mD=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||CN.isSsr)return{width:0,height:0};var n=function(e){var t=uD({},e);return Object.keys(t).forEach((function(e){t[e]||delete t[e]})),t}(t),r=JSON.stringify({text:e,copyStyle:n});if(dD.widthCache[r])return dD.widthCache[r];try{var o=document.getElementById(hD);o||((o=document.createElement("span")).setAttribute("id",hD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var i=uD(uD({},pD),n);Object.assign(o.style,i),o.textContent="".concat(e);var a=o.getBoundingClientRect(),s={width:a.width,height:a.height};return dD.widthCache[r]=s,++dD.cacheCount>2e3&&(dD.cacheCount=0,dD.widthCache={}),s}catch{return{width:0,height:0}}};function yD(e){return(yD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vD(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xD(r.key),r)}}function xD(e){var t=function(e){if("object"!=yD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yD(t)?t:t+""}var wD=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,_D=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,SD=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,OD=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,kD={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},jD=Object.keys(kD),ED="NaN",PD=function(){function e(t,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""!==n&&!SD.test(n)&&(this.num=NaN,this.unit=""),jD.includes(n)&&(this.num=function(e,t){return e*kD[t]}(t,n),this.unit="px")}return function(e,t,n){return t&&bD(e.prototype,t),n&&bD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(t){var n,r=gD(null!==(n=OD.exec(t))&&void 0!==n?n:[],3),o=r[1],i=r[2];return new e(parseFloat(o),i??"")}}])}();function CD(e){if(e.includes(ED))return ED;for(var t=e;t.includes("*")||t.includes("/");){var n,r=gD(null!==(n=wD.exec(t))&&void 0!==n?n:[],4),o=r[1],i=r[2],a=r[3],s=PD.parse(o??""),l=PD.parse(a??""),c="*"===i?s.multiply(l):s.divide(l);if(c.isNaN())return ED;t=t.replace(wD,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,f=gD(null!==(u=_D.exec(t))&&void 0!==u?u:[],4),d=f[1],p=f[2],h=f[3],m=PD.parse(d??""),y=PD.parse(h??""),g="+"===p?m.add(y):m.subtract(y);if(g.isNaN())return ED;t=t.replace(_D,g.toString())}return t}var TD=/\(([^()]*)\)/;function AD(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=gD(TD.exec(t),2)[1];t=t.replace(TD,CD(n))}return t}(t),CD(t)}(e)}catch{return ED}}(e.slice(5,-1));return t===ED?"":t}var MD=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],ND=["dx","dy","angle","className","breakAll"];function DD(){return DD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DD.apply(this,arguments)}function ID(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function RD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return LD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LD(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zD=/[ \f\n\r\t\v\u2028\u2029]+/,BD=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];Rk(t)||(o=n?t.toString().split(""):t.toString().split(zD));var i=o.map((function(e){return{word:e,width:mD(e,r).width}}));return{wordsWithComputedWidth:i,spaceWidth:n?0:mD(" ",r).width}}catch{return null}},FD=function(e){return[{words:Rk(e)?[]:e.toString().split(zD)}]},WD="#808080",VD=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,i=e.lineHeight,a=void 0===i?"1em":i,s=e.capHeight,l=void 0===s?"0.71em":s,c=e.scaleToFit,u=void 0!==c&&c,d=e.textAnchor,p=void 0===d?"start":d,h=e.verticalAnchor,m=void 0===h?"end":h,y=e.fill,g=void 0===y?WD:y,v=ID(e,MD),b=(0,f.useMemo)((function(){return function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,i=e.breakAll,a=e.maxLines;if((t||n)&&!CN.isSsr){var s=BD({breakAll:i,children:r,style:o});return s?function(e,t,n,r,o){var i=e.maxLines,a=e.children,s=e.style,l=e.breakAll,c=tj(i),u=a,f=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(e,t){var i=t.word,a=t.width,s=e[e.length-1];if(s&&(null==r||o||s.width+a+n<Number(r)))s.words.push(i),s.width+=a+n;else{var l={words:[i],width:a};e.push(l)}return e}),[])},d=f(t);if(!c)return d;for(var p,h=function(e){var t=u.slice(0,e),n=BD({breakAll:l,style:s,children:t+"…"}).wordsWithComputedWidth,o=f(n),a=o.length>i||function(e){return e.reduce((function(e,t){return e.width>t.width?e:t}))}(o).width>Number(r);return[a,o]},m=0,y=u.length-1,g=0;m<=y&&g<=u.length-1;){var v=Math.floor((m+y)/2),b=RD(h(v-1),2),x=b[0],w=b[1],_=RD(h(v),1)[0];if(!x&&!_&&(m=v+1),x&&_&&(y=v-1),!x&&_){p=w;break}g++}return p||d}({breakAll:i,children:r,maxLines:a,style:o},s.wordsWithComputedWidth,s.spaceWidth,t,n):FD(r)}return FD(r)}({breakAll:v.breakAll,children:v.children,maxLines:v.maxLines,scaleToFit:u,style:v.style,width:v.width})}),[v.breakAll,v.children,v.maxLines,u,v.style,v.width]),x=v.dx,w=v.dy,_=v.angle,S=v.className,O=v.breakAll,k=ID(v,ND);if(!nj(n)||!nj(o))return null;var j,E=n+(tj(x)?x:0),P=o+(tj(w)?w:0);switch(m){case"start":j=AD("calc(".concat(l,")"));break;case"middle":j=AD("calc(".concat((b.length-1)/2," * -").concat(a," + (").concat(l," / 2))"));break;default:j=AD("calc(".concat(b.length-1," * -").concat(a,")"))}var C=[];if(u){var T=b[0].width,A=v.width;C.push("scale(".concat((tj(A)?A/T:1)/T,")"))}return _&&C.push("rotate(".concat(_,", ").concat(E,", ").concat(P,")")),C.length&&(k.transform=C.join(" ")),f.createElement("text",DD({},Aj(k,!0),{x:E,y:P,className:ge("recharts-text",S),textAnchor:p,fill:g.includes("url")?WD:g}),b.map((function(e,t){var n=e.words.join(O?"":" ");return f.createElement("tspan",{x:E,dy:0===t?j:a,key:"".concat(n,"-").concat(t)},n)})))};function $D(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function UD(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function KD(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=$D,n=(t,n)=>$D(e(t),n),r=(t,n)=>e(t)-n):(t=e===$D||e===UD?e:qD,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function qD(){return 0}function HD(e){return null===e?NaN:+e}const YD=KD($D).right;KD(HD).center;class XD extends Map{constructor(e,t=ZD){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(GD(this,e))}has(e){return super.has(GD(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function GD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ZD(e){return null!==e&&"object"==typeof e?e.valueOf():e}function JD(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const QD=Math.sqrt(50),eI=Math.sqrt(10),tI=Math.sqrt(2);function nI(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=QD?10:i>=eI?5:i>=tI?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?nI(e,t,2*n):[s,l,c]}function rI(e,t,n){if(!((n=+n)>0))return[];if((e=+e)==(t=+t))return[e];const r=t<e,[o,i,a]=r?nI(t,e,n):nI(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}function oI(e,t,n){return nI(e=+e,t=+t,n=+n)[2]}function iI(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?oI(t,e,n):oI(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function aI(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function sI(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function lI(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?JD:function(e=$D){if(e===$D)return JD;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);lI(e,t,Math.max(n,Math.floor(t-a*l/i+c)),Math.min(r,Math.floor(t+(i-a)*l/i+c)),o)}const i=e[t];let a=n,s=r;for(cI(e,n,t),o(e[r],i)>0&&cI(e,n,r);a<s;){for(cI(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}0===o(e[n],i)?cI(e,n,s):(++s,cI(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function cI(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function uI(e,t,n=HD){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function fI(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function dI(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const pI=Symbol("implicit");function hI(){var e=new XD,t=[],n=[],r=pI;function o(o){let i=e.get(o);if(void 0===i){if(r!==pI)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new XD;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return hI(t,n).unknown(r)},fI.apply(o,arguments),o}function mI(){var e,t,n=hI().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function f(){var n=r().length,f=a<i,d=f?a:i,p=f?i:a;e=(p-d)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),d+=(p-d-e*(n-l))*u,t=e*(1-l),s&&(d=Math.round(d),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map((function(t){return d+e*t}));return o(f?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),f()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,f()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,f()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,f()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),f()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),f()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,f()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),f()):u},n.copy=function(){return mI(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},fI.apply(f(),arguments)}function yI(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return yI(t())},e}function gI(){return yI(mI.apply(null,arguments).paddingInner(1))}function vI(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function bI(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xI(){}var wI=.7,_I=1/wI,SI="\\s*([+-]?\\d+)\\s*",OI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kI="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jI=/^#([0-9a-f]{3,8})$/,EI=new RegExp(`^rgb\\(${SI},${SI},${SI}\\)$`),PI=new RegExp(`^rgb\\(${kI},${kI},${kI}\\)$`),CI=new RegExp(`^rgba\\(${SI},${SI},${SI},${OI}\\)$`),TI=new RegExp(`^rgba\\(${kI},${kI},${kI},${OI}\\)$`),AI=new RegExp(`^hsl\\(${OI},${kI},${kI}\\)$`),MI=new RegExp(`^hsla\\(${OI},${kI},${kI},${OI}\\)$`),NI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function DI(){return this.rgb().formatHex()}function II(){return this.rgb().formatRgb()}function RI(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=jI.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?LI(t):3===n?new FI(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?zI(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?zI(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=EI.exec(e))?new FI(t[1],t[2],t[3],1):(t=PI.exec(e))?new FI(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=CI.exec(e))?zI(t[1],t[2],t[3],t[4]):(t=TI.exec(e))?zI(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=AI.exec(e))?qI(t[1],t[2]/100,t[3]/100,1):(t=MI.exec(e))?qI(t[1],t[2]/100,t[3]/100,t[4]):NI.hasOwnProperty(e)?LI(NI[e]):"transparent"===e?new FI(NaN,NaN,NaN,0):null}function LI(e){return new FI(e>>16&255,e>>8&255,255&e,1)}function zI(e,t,n,r){return r<=0&&(e=t=n=NaN),new FI(e,t,n,r)}function BI(e,t,n,r){return 1===arguments.length?function(e){return e instanceof xI||(e=RI(e)),e?new FI((e=e.rgb()).r,e.g,e.b,e.opacity):new FI}(e):new FI(e,t,n,r??1)}function FI(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function WI(){return`#${KI(this.r)}${KI(this.g)}${KI(this.b)}`}function VI(){const e=$I(this.opacity);return`${1===e?"rgb(":"rgba("}${UI(this.r)}, ${UI(this.g)}, ${UI(this.b)}${1===e?")":`, ${e})`}`}function $I(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function UI(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function KI(e){return((e=UI(e))<16?"0":"")+e.toString(16)}function qI(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new YI(e,t,n,r)}function HI(e){if(e instanceof YI)return new YI(e.h,e.s,e.l,e.opacity);if(e instanceof xI||(e=RI(e)),!e)return new YI;if(e instanceof YI)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new YI(a,s,l,e.opacity)}function YI(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function XI(e){return(e=(e||0)%360)<0?e+360:e}function GI(e){return Math.max(0,Math.min(1,e||0))}function ZI(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}vI(xI,RI,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:DI,formatHex:DI,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return HI(this).formatHsl()},formatRgb:II,toString:II}),vI(FI,BI,bI(xI,{brighter(e){return e=null==e?_I:Math.pow(_I,e),new FI(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?wI:Math.pow(wI,e),new FI(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new FI(UI(this.r),UI(this.g),UI(this.b),$I(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:WI,formatHex:WI,formatHex8:function(){return`#${KI(this.r)}${KI(this.g)}${KI(this.b)}${KI(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:VI,toString:VI})),vI(YI,(function(e,t,n,r){return 1===arguments.length?HI(e):new YI(e,t,n,r??1)}),bI(xI,{brighter(e){return e=null==e?_I:Math.pow(_I,e),new YI(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?wI:Math.pow(wI,e),new YI(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new FI(ZI(e>=240?e-240:e+120,o,r),ZI(e,o,r),ZI(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new YI(XI(this.h),GI(this.s),GI(this.l),$I(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=$I(this.opacity);return`${1===e?"hsl(":"hsla("}${XI(this.h)}, ${100*GI(this.s)}%, ${100*GI(this.l)}%${1===e?")":`, ${e})`}`}}));const JI=e=>()=>e;function QI(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):JI(isNaN(e)?t:e)}const eR=function e(t){var n=function(e){return 1==(e=+e)?QI:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):JI(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=BI(e)).r,(t=BI(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=QI(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function tR(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function nR(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=cR(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function rR(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function oR(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function iR(e,t){var n,r={},o={};for(n in(null===e||"object"!=typeof e)&&(e={}),(null===t||"object"!=typeof t)&&(t={}),t)n in e?r[n]=cR(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var aR=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sR=new RegExp(aR.source,"g");function lR(e,t){var n,r,o,i=aR.lastIndex=sR.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=aR.exec(e))&&(r=sR.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:oR(n,r)})),i=sR.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function cR(e,t){var n,r=typeof t;return null==t||"boolean"===r?JI(t):("number"===r?oR:"string"===r?(n=RI(t))?(t=n,eR):lR:t instanceof RI?eR:t instanceof Date?rR:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?tR:Array.isArray(t)?nR:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?iR:oR)(e,t)}function uR(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function fR(e){return+e}var dR=[0,1];function pR(e){return e}function hR(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function mR(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=hR(o,r),i=n(a,i)):(r=hR(r,o),i=n(i,a)),function(e){return i(r(e))}}function yR(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=hR(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=YD(e,t,1,r)-1;return i[n](o[n](t))}}function gR(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function vR(){var e,t,n,r,o,i,a=dR,s=dR,l=cR,c=pR;function u(){var e=Math.min(a.length,s.length);return c!==pR&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?yR:mR,o=i=null,f}function f(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return f.invert=function(n){return c(t((i||(i=r(s,a.map(e),oR)))(n)))},f.domain=function(e){return arguments.length?(a=Array.from(e,fR),u()):a.slice()},f.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},f.rangeRound=function(e){return s=Array.from(e),l=uR,u()},f.clamp=function(e){return arguments.length?(c=!!e||pR,u()):c!==pR},f.interpolate=function(e){return arguments.length?(l=e,u()):l},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}function bR(){return vR()(pR,pR)}function xR(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function wR(e){return(e=xR(Math.abs(e)))?e[1]:NaN}var _R,SR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function OR(e){if(!(t=SR.exec(e)))throw new Error("invalid format: "+e);var t;return new kR({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function kR(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function jR(e,t){var n=xR(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}OR.prototype=kR.prototype,kR.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ER={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>jR(100*e,t),r:jR,s:function(e,t){var n=xR(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(_R=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+xR(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function PR(e){return e}var CR,TR,AR,MR=Array.prototype.map,NR=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DR(e,t,n,r){var o,i=iI(e,t,n);switch((r=OR(r??",f")).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null==r.precision&&!isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wR(t)/3)))-wR(Math.abs(e)))}(i,a))&&(r.precision=o),AR(r,a);case"":case"e":case"g":case"p":case"r":null==r.precision&&!isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,wR(t)-wR(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-("e"===r.type));break;case"f":case"%":null==r.precision&&!isNaN(o=function(e){return Math.max(0,-wR(Math.abs(e)))}(i))&&(r.precision=o-2*("%"===r.type))}return TR(r)}function IR(e){var t=e.domain;return e.ticks=function(e){var n=t();return rI(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return DR(r[0],r[r.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=oI(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function RR(){var e=bR();return e.copy=function(){return gR(e,RR())},fI.apply(e,arguments),IR(e)}function LR(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function zR(e){return Math.log(e)}function BR(e){return Math.exp(e)}function FR(e){return-Math.log(-e)}function WR(e){return-Math.exp(-e)}function VR(e){return isFinite(e)?+("1e"+e):e<0?0:e}function $R(e){return(t,n)=>-e(-t,n)}function UR(e){const t=e(zR,BR),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?VR:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=$R(r),o=$R(o),e(FR,WR)):e(zR,BR),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,f=r(a),d=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&d-f<p){if(f=Math.floor(f),d=Math.ceil(d),a>0){for(;f<=d;++f)for(c=1;c<i;++c)if(u=f<0?c/o(-f):c*o(f),!(u<a)){if(u>s)break;h.push(u)}}else for(;f<=d;++f)for(c=i-1;c>=1;--c)if(u=f>0?c/o(-f):c*o(f),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=rI(a,s,p))}else h=rI(f,d,Math.min(d-f,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(!(i%1)&&null==(n=OR(n)).precision&&(n.trim=!0),n=TR(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(LR(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function KR(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function qR(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function HR(e){var t=1,n=e(KR(t),qR(t));return n.constant=function(n){return arguments.length?e(KR(t=+n),qR(t)):t},IR(n)}function YR(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function XR(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function GR(e){return e<0?-e*e:e*e}function ZR(e){var t=e(pR,pR),n=1;return t.exponent=function(t){return arguments.length?1==(n=+t)?e(pR,pR):.5===n?e(XR,GR):e(YR(n),YR(1/n)):n},IR(t)}function JR(){var e=ZR(vR());return e.copy=function(){return gR(e,JR()).exponent(e.exponent())},fI.apply(e,arguments),e}function QR(e){return Math.sign(e)*e*e}CR=function(e){var t=void 0===e.grouping||void 0===e.thousands?PR:function(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}(MR.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",o=void 0===e.decimal?".":e.decimal+"",i=void 0===e.numerals?PR:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(MR.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",s=void 0===e.minus?"−":e.minus+"",l=void 0===e.nan?"NaN":e.nan+"";function c(e){var c=(e=OR(e)).fill,u=e.align,f=e.sign,d=e.symbol,p=e.zero,h=e.width,m=e.comma,y=e.precision,g=e.trim,v=e.type;"n"===v?(m=!0,v="g"):ER[v]||(void 0===y&&(y=12),g=!0,v="g"),(p||"0"===c&&"="===u)&&(p=!0,c="0",u="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===d?r:/[%p]/.test(v)?a:"",w=ER[v],_=/[defgprs%]/.test(v);function S(e){var n,r,a,d=b,S=x;if("c"===v)S=w(e)+S,e="";else{var O=(e=+e)<0||1/e<0;if(e=isNaN(e)?l:w(Math.abs(e),y),g&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),O&&0==+e&&"+"!==f&&(O=!1),d=(O?"("===f?f:s:"-"===f||"("===f?"":f)+d,S=("s"===v?NR[8+_R/3]:"")+S+(O&&"("===f?")":""),_)for(n=-1,r=e.length;++n<r;)if(48>(a=e.charCodeAt(n))||a>57){S=(46===a?o+e.slice(n+1):e.slice(n))+S,e=e.slice(0,n);break}}m&&!p&&(e=t(e,1/0));var k=d.length+e.length+S.length,j=k<h?new Array(h-k+1).join(c):"";switch(m&&p&&(e=t(j+e,j.length?h-S.length:1/0),j=""),u){case"<":e=d+e+S+j;break;case"=":e=d+j+e+S;break;case"^":e=j.slice(0,k=j.length>>1)+d+e+S+j.slice(k);break;default:e=j+d+e+S}return i(e)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),S.toString=function(){return e+""},S}return{format:c,formatPrefix:function(e,t){var n=c(((e=OR(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(wR(t)/3))),o=Math.pow(10,-r),i=NR[8+r/3];return function(e){return n(o*e)+i}}}}({thousands:",",grouping:[3],currency:["$",""]}),TR=CR.format,AR=CR.formatPrefix;const eL=new Date,tL=new Date;function nL(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>nL((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(o.count=(t,r)=>(eL.setTime(+t),tL.setTime(+r),e(eL),e(tL),Math.floor(n(eL,tL))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}const rL=nL((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));rL.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?nL((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):rL:null),rL.range;const oL=1e3,iL=6e4,aL=60*iL,sL=24*aL,lL=7*sL,cL=30*sL,uL=365*sL,fL=nL((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*oL)}),((e,t)=>(t-e)/oL),(e=>e.getUTCSeconds()));fL.range;const dL=nL((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oL)}),((e,t)=>{e.setTime(+e+t*iL)}),((e,t)=>(t-e)/iL),(e=>e.getMinutes()));dL.range;const pL=nL((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*iL)}),((e,t)=>(t-e)/iL),(e=>e.getUTCMinutes()));pL.range;const hL=nL((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*oL-e.getMinutes()*iL)}),((e,t)=>{e.setTime(+e+t*aL)}),((e,t)=>(t-e)/aL),(e=>e.getHours()));hL.range;const mL=nL((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*aL)}),((e,t)=>(t-e)/aL),(e=>e.getUTCHours()));mL.range;const yL=nL((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*iL)/sL),(e=>e.getDate()-1));yL.range;const gL=nL((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sL),(e=>e.getUTCDate()-1));gL.range;const vL=nL((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/sL),(e=>Math.floor(e/sL)));function bL(e){return nL((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*iL)/lL))}vL.range;const xL=bL(0),wL=bL(1),_L=bL(2),SL=bL(3),OL=bL(4),kL=bL(5),jL=bL(6);function EL(e){return nL((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/lL))}xL.range,wL.range,_L.range,SL.range,OL.range,kL.range,jL.range;const PL=EL(0),CL=EL(1),TL=EL(2),AL=EL(3),ML=EL(4),NL=EL(5),DL=EL(6);PL.range,CL.range,TL.range,AL.range,ML.range,NL.range,DL.range;const IL=nL((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));IL.range;const RL=nL((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));RL.range;const LL=nL((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));LL.every=e=>isFinite(e=Math.floor(e))&&e>0?nL((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,LL.range;const zL=nL((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function BL(e,t,n,r,o,i){const a=[[fL,1,oL],[fL,5,5e3],[fL,15,15e3],[fL,30,3e4],[i,1,iL],[i,5,5*iL],[i,15,15*iL],[i,30,30*iL],[o,1,aL],[o,3,3*aL],[o,6,6*aL],[o,12,12*aL],[r,1,sL],[r,2,2*sL],[n,1,lL],[t,1,cL],[t,3,3*cL],[e,1,uL]];function s(t,n,r){const o=Math.abs(n-t)/r,i=KD((([,,e])=>e)).right(a,o);if(i===a.length)return e.every(iI(t/uL,n/uL,r));if(0===i)return rL.every(Math.max(iI(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}zL.every=e=>isFinite(e=Math.floor(e))&&e>0?nL((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,zL.range;const[FL,WL]=BL(zL,RL,PL,vL,mL,pL),[VL,$L]=BL(LL,IL,xL,yL,hL,dL);function UL(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function KL(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qL(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var HL,YL,XL,GL={"-":"",_:" ",0:"0"},ZL=/^\s*\d+/,JL=/^%/,QL=/[\\^$*+?|[\]().{}]/g;function ez(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function tz(e){return e.replace(QL,"\\$&")}function nz(e){return new RegExp("^(?:"+e.map(tz).join("|")+")","i")}function rz(e){return new Map(e.map(((e,t)=>[e.toLowerCase(),t])))}function oz(e,t,n){var r=ZL.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function iz(e,t,n){var r=ZL.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function az(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function sz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function lz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function cz(e,t,n){var r=ZL.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function uz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function fz(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function dz(e,t,n){var r=ZL.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function pz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function hz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function mz(e,t,n){var r=ZL.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function yz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function gz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function vz(e,t,n){var r=ZL.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function bz(e,t,n){var r=ZL.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function xz(e,t,n){var r=ZL.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function wz(e,t,n){var r=JL.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function _z(e,t,n){var r=ZL.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Sz(e,t,n){var r=ZL.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Oz(e,t){return ez(e.getDate(),t,2)}function kz(e,t){return ez(e.getHours(),t,2)}function jz(e,t){return ez(e.getHours()%12||12,t,2)}function Ez(e,t){return ez(1+yL.count(LL(e),e),t,3)}function Pz(e,t){return ez(e.getMilliseconds(),t,3)}function Cz(e,t){return Pz(e,t)+"000"}function Tz(e,t){return ez(e.getMonth()+1,t,2)}function Az(e,t){return ez(e.getMinutes(),t,2)}function Mz(e,t){return ez(e.getSeconds(),t,2)}function Nz(e){var t=e.getDay();return 0===t?7:t}function Dz(e,t){return ez(xL.count(LL(e)-1,e),t,2)}function Iz(e){var t=e.getDay();return t>=4||0===t?OL(e):OL.ceil(e)}function Rz(e,t){return e=Iz(e),ez(OL.count(LL(e),e)+(4===LL(e).getDay()),t,2)}function Lz(e){return e.getDay()}function zz(e,t){return ez(wL.count(LL(e)-1,e),t,2)}function Bz(e,t){return ez(e.getFullYear()%100,t,2)}function Fz(e,t){return ez((e=Iz(e)).getFullYear()%100,t,2)}function Wz(e,t){return ez(e.getFullYear()%1e4,t,4)}function Vz(e,t){var n=e.getDay();return ez((e=n>=4||0===n?OL(e):OL.ceil(e)).getFullYear()%1e4,t,4)}function $z(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ez(t/60|0,"0",2)+ez(t%60,"0",2)}function Uz(e,t){return ez(e.getUTCDate(),t,2)}function Kz(e,t){return ez(e.getUTCHours(),t,2)}function qz(e,t){return ez(e.getUTCHours()%12||12,t,2)}function Hz(e,t){return ez(1+gL.count(zL(e),e),t,3)}function Yz(e,t){return ez(e.getUTCMilliseconds(),t,3)}function Xz(e,t){return Yz(e,t)+"000"}function Gz(e,t){return ez(e.getUTCMonth()+1,t,2)}function Zz(e,t){return ez(e.getUTCMinutes(),t,2)}function Jz(e,t){return ez(e.getUTCSeconds(),t,2)}function Qz(e){var t=e.getUTCDay();return 0===t?7:t}function eB(e,t){return ez(PL.count(zL(e)-1,e),t,2)}function tB(e){var t=e.getUTCDay();return t>=4||0===t?ML(e):ML.ceil(e)}function nB(e,t){return e=tB(e),ez(ML.count(zL(e),e)+(4===zL(e).getUTCDay()),t,2)}function rB(e){return e.getUTCDay()}function oB(e,t){return ez(CL.count(zL(e)-1,e),t,2)}function iB(e,t){return ez(e.getUTCFullYear()%100,t,2)}function aB(e,t){return ez((e=tB(e)).getUTCFullYear()%100,t,2)}function sB(e,t){return ez(e.getUTCFullYear()%1e4,t,4)}function lB(e,t){var n=e.getUTCDay();return ez((e=n>=4||0===n?ML(e):ML.ceil(e)).getUTCFullYear()%1e4,t,4)}function cB(){return"+0000"}function uB(){return"%"}function fB(e){return+e}function dB(e){return Math.floor(+e/1e3)}function pB(e){return new Date(e)}function hB(e){return e instanceof Date?+e:+new Date(+e)}function mB(e,t,n,r,o,i,a,s,l,c){var u=bR(),f=u.invert,d=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),y=c("%I %p"),g=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?y:r(e)<e?o(e)<e?g:v:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(f(e))},u.domain=function(e){return arguments.length?d(Array.from(e,hB)):d().map(pB)},u.ticks=function(t){var n=d();return e(n[0],n[n.length-1],t??10)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=d();return(!e||"function"!=typeof e.range)&&(e=t(n[0],n[n.length-1],e??10)),e?d(LR(n,e)):u},u.copy=function(){return gR(u,mB(e,t,n,r,o,i,a,s,l,c))},u}function yB(){var e,t,n,r,o,i=0,a=1,s=pR,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(cR),c.rangeRound=u(uR),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}function gB(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function vB(){var e=ZR(yB());return e.copy=function(){return gB(e,vB()).exponent(e.exponent())},dI.apply(e,arguments)}function bB(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,f=pR,d=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),f(d?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,f=function(e,t){void 0===t&&(t=e,e=cR);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}(e,[n,r,o]),p):[f(0),f(.5),f(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(d=!!e,p):d},p.interpolator=function(e){return arguments.length?(f=e,p):f},p.range=h(cR),p.rangeRound=h(uR),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function xB(){var e=ZR(bB());return e.copy=function(){return gB(e,xB()).exponent(e.exponent())},dI.apply(e,arguments)}HL=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=nz(o),u=rz(o),f=nz(i),d=rz(i),p=nz(a),h=rz(a),m=nz(s),y=rz(s),g=nz(l),v=rz(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:Oz,e:Oz,f:Cz,g:Fz,G:Vz,H:kz,I:jz,j:Ez,L:Pz,m:Tz,M:Az,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:fB,s:dB,S:Mz,u:Nz,U:Dz,V:Rz,w:Lz,W:zz,x:null,X:null,y:Bz,Y:Wz,Z:$z,"%":uB},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Uz,e:Uz,f:Xz,g:aB,G:lB,H:Kz,I:qz,j:Hz,L:Yz,m:Gz,M:Zz,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:fB,s:dB,S:Jz,u:Qz,U:eB,V:nB,w:rB,W:oB,x:null,X:null,y:iB,Y:sB,Z:cB,"%":uB},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return O(e,t,n,r)},d:hz,e:hz,f:xz,g:uz,G:cz,H:yz,I:yz,j:mz,L:bz,m:pz,M:gz,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:dz,Q:_z,s:Sz,S:vz,u:iz,U:az,V:sz,w:oz,W:lz,x:function(e,t,r){return O(e,n,t,r)},X:function(e,t,n){return O(e,r,t,n)},y:uz,Y:cz,Z:fz,"%":wz};function _(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=GL[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function S(e,t){return function(n){var r,o,i=qL(1900,void 0,1);if(O(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=KL(qL(i.y,0,1))).getUTCDay(),r=o>4||0===o?CL.ceil(r):CL(r),r=gL.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=UL(qL(i.y,0,1))).getDay(),r=o>4||0===o?wL.ceil(r):wL(r),r=yL.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?KL(qL(i.y,0,1)).getUTCDay():UL(qL(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,KL(i)):UL(i)}}function O(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in GL?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=_(n,b),b.X=_(r,b),b.c=_(t,b),x.x=_(n,x),x.X=_(r,x),x.c=_(t,x),{format:function(e){var t=_(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=_(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),YL=HL.format,HL.parse,XL=HL.utcFormat,HL.utcParse;const wB=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:mI,scaleDiverging:function e(){var t=IR(bB()(pR));return t.copy=function(){return gB(t,e())},dI.apply(t,arguments)},scaleDivergingLog:function e(){var t=UR(bB()).domain([.1,1,10]);return t.copy=function(){return gB(t,e()).base(t.base())},dI.apply(t,arguments)},scaleDivergingPow:xB,scaleDivergingSqrt:function(){return xB.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=HR(bB());return t.copy=function(){return gB(t,e()).constant(t.constant())},dI.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,fR),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,fR):[0,1],IR(r)},scaleImplicit:pI,scaleLinear:RR,scaleLog:function e(){const t=UR(vR()).domain([1,10]);return t.copy=()=>gR(t,e()).base(t.base()),fI.apply(t,arguments),t},scaleOrdinal:hI,scalePoint:gI,scalePow:JR,scaleQuantile:function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=uI(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[YD(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null!=t&&!isNaN(t=+t)&&n.push(t);return n.sort($D),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},fI.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[YD(i,e,0,o)]:t}function l(){var e=-1;for(i=new Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(o=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},s.unknown=function(e){return arguments.length&&(t=e),s},s.thresholds=function(){return i.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},fI.apply(IR(s),arguments)},scaleRadial:function e(){var t,n=bR(),r=[0,1],o=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return i.invert=function(e){return n.invert(QR(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,fR)).map(QR)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},fI.apply(i,arguments),IR(i)},scaleSequential:function e(){var t=IR(yB()(pR));return t.copy=function(){return gB(t,e())},dI.apply(t,arguments)},scaleSequentialLog:function e(){var t=UR(yB()).domain([1,10]);return t.copy=function(){return gB(t,e()).base(t.base())},dI.apply(t,arguments)},scaleSequentialPow:vB,scaleSequentialQuantile:function e(){var t=[],n=pR;function r(e){if(null!=e&&!isNaN(e=+e))return n((YD(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null!=n&&!isNaN(n=+n)&&t.push(n);return t.sort($D),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map(((e,r)=>n(r/(t.length-1))))},r.quantiles=function(e){return Array.from({length:e+1},((n,r)=>function(e,t){if(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e)),(n=e.length)&&!isNaN(t=+t)){if(t<=0||n<2)return sI(e);if(t>=1)return aI(e);var n,r=(n-1)*t,o=Math.floor(r),i=aI(lI(e,o).subarray(0,o+1));return i+(sI(e.subarray(o+1))-i)*(r-o)}}(t,r/e)))},r.copy=function(){return e(n).domain(t)},dI.apply(r,arguments)},scaleSequentialSqrt:function(){return vB.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=HR(yB());return t.copy=function(){return gB(t,e()).constant(t.constant())},dI.apply(t,arguments)},scaleSqrt:function(){return JR.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=HR(vR());return t.copy=function(){return gR(t,e()).constant(t.constant())},fI.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[YD(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},fI.apply(i,arguments)},scaleTime:function(){return fI.apply(mB(VL,$L,LL,IL,xL,yL,hL,dL,fL,YL).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return fI.apply(mB(FL,WL,zL,RL,PL,gL,mL,pL,fL,XL).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:DR},Symbol.toStringTag,{value:"Module"}));var _B=BS,SB=function(e,t,n){for(var r=-1,o=e.length;++r<o;){var i=e[r],a=t(i);if(null!=a&&(void 0===s?a==a&&!_B(a):n(a,s)))var s=a,l=i}return l},OB=function(e,t){return e>t},kB=SB,jB=OB,EB=SA,PB=function(e){return e&&e.length?kB(e,EB,jB):void 0};const CB=m(PB);var TB=function(e,t){return e<t},AB=SB,MB=TB,NB=SA,DB=function(e){return e&&e.length?AB(e,NB,MB):void 0};const IB=m(DB);var RB=hk,LB=DA,zB=OM,BB=xS,FB=yM,WB=function(e,t){return(BB(e)?RB:zB)(e,LB(t))},VB=function(e,t){return FB(WB(e,t),1)};const $B=m(VB);var UB=ZT,KB=function(e,t){return UB(e,t)};const qB=m(KB);var HB,YB=1e9,XB=!0,GB="[DecimalError] ",ZB=GB+"Invalid argument: ",JB=GB+"Exponent out of range: ",QB=Math.floor,eF=Math.pow,tF=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,nF=1e7,rF=9007199254740991,oF=QB(rF/7),iF={};function aF(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),XB?yF(t,f):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),i>(s=(a=Math.ceil(f/7))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=l.length)-(i=c.length)<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/nF|0,l[i]%=nF;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,XB?yF(t,f):t}function sF(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ZB+e)}function lF(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=pF(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=pF(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}iF.absoluteValue=iF.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},iF.comparedTo=iF.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},iF.decimalPlaces=iF.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},iF.dividedBy=iF.div=function(e){return cF(this,new this.constructor(e))},iF.dividedToIntegerBy=iF.idiv=function(e){var t=this.constructor;return yF(cF(this,new t(e),0,1),t.precision)},iF.equals=iF.eq=function(e){return!this.cmp(e)},iF.exponent=function(){return fF(this)},iF.greaterThan=iF.gt=function(e){return this.cmp(e)>0},iF.greaterThanOrEqualTo=iF.gte=function(e){return this.cmp(e)>=0},iF.isInteger=iF.isint=function(){return this.e>this.d.length-2},iF.isNegative=iF.isneg=function(){return this.s<0},iF.isPositive=iF.ispos=function(){return this.s>0},iF.isZero=function(){return 0===this.s},iF.lessThan=iF.lt=function(e){return this.cmp(e)<0},iF.lessThanOrEqualTo=iF.lte=function(e){return this.cmp(e)<1},iF.logarithm=iF.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(HB))throw Error(GB+"NaN");if(n.s<1)throw Error(GB+(n.s?"NaN":"-Infinity"));return n.eq(HB)?new r(0):(XB=!1,t=cF(hF(n,i),hF(e,i),i),XB=!0,yF(t,o))},iF.minus=iF.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gF(t,e):aF(t,(e.s=-e.s,e))},iF.modulo=iF.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(GB+"NaN");return n.s?(XB=!1,t=cF(n,e,0,1).times(e),XB=!0,n.minus(t)):yF(new r(n),o)},iF.naturalExponential=iF.exp=function(){return uF(this)},iF.naturalLogarithm=iF.ln=function(){return hF(this)},iF.negated=iF.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},iF.plus=iF.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?aF(t,e):gF(t,(e.s=-e.s,e))},iF.precision=iF.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(ZB+e);if(t=fF(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},iF.squareRoot=iF.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(GB+"NaN")}for(e=fF(s),XB=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=lF(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=QB((e+1)/2)-(e<0||e%2),r=new l(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(o.toString()),o=a=(n=l.precision)+3;;)if(r=(i=r).plus(cF(s,i,a+2)).times(.5),lF(i.d).slice(0,a)===(t=lF(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(yF(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if("9999"!=t)break;a+=4}return XB=!0,yF(r,n)},iF.times=iF.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,f=u.constructor,d=u.d,p=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,n=u.e+e.e,(l=d.length)<(c=p.length)&&(i=d,d=p,p=i,a=l,l=c,c=a),i=[],r=a=l+c;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*d[o-r-1]+t,i[o--]=s%nF|0,t=s/nF|0;i[o]=(i[o]+t)%nF|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,XB?yF(e,f.precision):e},iF.toDecimalPlaces=iF.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(sF(e,0,YB),void 0===t?t=r.rounding:sF(t,0,8),yF(n,e+fF(n)+1,t))},iF.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=vF(r,!0):(sF(e,0,YB),void 0===t?t=o.rounding:sF(t,0,8),n=vF(r=yF(new o(r),e+1,t),!0,e+1)),n},iF.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?vF(o):(sF(e,0,YB),void 0===t?t=i.rounding:sF(t,0,8),n=vF((r=yF(new i(o),e+fF(o)+1,t)).abs(),!1,e+fF(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},iF.toInteger=iF.toint=function(){var e=this,t=e.constructor;return yF(new t(e),fF(e)+1,t.rounding)},iF.toNumber=function(){return+this},iF.toPower=iF.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(HB);if(!(s=new l(s)).s){if(e.s<1)throw Error(GB+"Infinity");return s}if(s.eq(HB))return s;if(r=l.precision,e.eq(HB))return yF(s,r);if(a=(t=e.e)>=(n=e.d.length-1),i=s.s,a){if((n=c<0?-c:c)<=rF){for(o=new l(HB),t=Math.ceil(r/7+4),XB=!1;n%2&&bF((o=o.times(s)).d,t),0!==(n=QB(n/2));)bF((s=s.times(s)).d,t);return XB=!0,e.s<0?new l(HB).div(o):yF(o,r)}}else if(i<0)throw Error(GB+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,XB=!1,o=e.times(hF(s,r+12)),XB=!0,(o=uF(o)).s=i,o},iF.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?r=vF(o,(n=fF(o))<=i.toExpNeg||n>=i.toExpPos):(sF(e,1,YB),void 0===t?t=i.rounding:sF(t,0,8),r=vF(o=yF(new i(o),e,t),e<=(n=fF(o))||n<=i.toExpNeg,e)),r},iF.toSignificantDigits=iF.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(sF(e,1,YB),void 0===t?t=n.rounding:sF(t,0,8)),yF(new n(this),e,t)},iF.toString=iF.valueOf=iF.val=iF.toJSON=iF[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=fF(e),n=e.constructor;return vF(e,t<=n.toExpNeg||t>=n.toExpPos)};var cF=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%nF|0,r=n/nF|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*nF+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var s,l,c,u,f,d,p,h,m,y,g,v,b,x,w,_,S,O,k=r.constructor,j=r.s==o.s?1:-1,E=r.d,P=o.d;if(!r.s)return new k(r);if(!o.s)throw Error(GB+"Division by zero");for(l=r.e-o.e,S=P.length,w=E.length,h=(p=new k(j)).d=[],c=0;P[c]==(E[c]||0);)++c;if(P[c]>(E[c]||0)&&--l,(v=null==i?i=k.precision:a?i+(fF(r)-fF(o))+1:i)<0)return new k(0);if(v=v/7+2|0,c=0,1==S)for(u=0,P=P[0],v++;(c<w||u)&&v--;c++)b=u*nF+(E[c]||0),h[c]=b/P|0,u=b%P|0;else{for((u=nF/(P[0]+1)|0)>1&&(P=e(P,u),E=e(E,u),S=P.length,w=E.length),x=S,y=(m=E.slice(0,S)).length;y<S;)m[y++]=0;(O=P.slice()).unshift(0),_=P[0],P[1]>=nF/2&&++_;do{u=0,(s=t(P,m,S,y))<0?(g=m[0],S!=y&&(g=g*nF+(m[1]||0)),(u=g/_|0)>1?(u>=nF&&(u=nF-1),1==(s=t(f=e(P,u),m,d=f.length,y=m.length))&&(u--,n(f,S<d?O:P,d))):(0==u&&(s=u=1),f=P.slice()),(d=f.length)<y&&f.unshift(0),n(m,f,y),-1==s&&(s=t(P,m,S,y=m.length))<1&&(u++,n(m,S<y?O:P,y)),y=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[y++]=E[x]||0:(m=[E[x]],y=1)}while((x++<w||void 0!==m[0])&&v--)}return h[0]||h.shift(),p.e=l,yF(p,a?i+fF(p)+1:i)}}();function uF(e,t){var n,r,o,i,a,s=0,l=0,c=e.constructor,u=c.precision;if(fF(e)>16)throw Error(JB+fF(e));if(!e.s)return new c(HB);for(null==t?(XB=!1,a=u):a=t,i=new c(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(a+=Math.log(eF(2,l))/Math.LN10*2+5|0,n=r=o=new c(HB),c.precision=a;;){if(r=yF(r.times(e),a),n=n.times(++s),lF((i=o.plus(cF(r,n,a))).d).slice(0,a)===lF(o.d).slice(0,a)){for(;l--;)o=yF(o.times(o),a);return c.precision=u,null==t?(XB=!0,yF(o,u)):o}o=i}}function fF(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function dF(e,t,n){if(t>e.LN10.sd())throw XB=!0,n&&(e.precision=n),Error(GB+"LN10 precision limit exceeded");return yF(new e(e.LN10),t)}function pF(e){for(var t="";e--;)t+="0";return t}function hF(e,t){var n,r,o,i,a,s,l,c,u,f=1,d=e,p=d.d,h=d.constructor,m=h.precision;if(d.s<1)throw Error(GB+(d.s?"NaN":"-Infinity"));if(d.eq(HB))return new h(0);if(null==t?(XB=!1,c=m):c=t,d.eq(10))return null==t&&(XB=!0),dF(h,c);if(c+=10,h.precision=c,r=(n=lF(p)).charAt(0),i=fF(d),!(Math.abs(i)<15e14))return l=dF(h,c+2,m).times(i+""),d=hF(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(XB=!0,yF(d,m)):d;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=lF((d=d.times(e)).d)).charAt(0),f++;for(i=fF(d),r>1?(d=new h("0."+n),i++):d=new h(r+"."+n.slice(1)),s=a=d=cF(d.minus(HB),d.plus(HB),c),u=yF(d.times(d),c),o=3;;){if(a=yF(a.times(u),c),lF((l=s.plus(cF(a,new h(o),c))).d).slice(0,c)===lF(s.d).slice(0,c))return s=s.times(2),0!==i&&(s=s.plus(dF(h,c+2,m).times(i+""))),s=cF(s,new h(f),c),h.precision=m,null==t?(XB=!0,yF(s,m)):s;s=l,o+=2}}function mF(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=QB(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),XB&&(e.e>oF||e.e<-oF))throw Error(JB+n)}else e.s=0,e.e=0,e.d=[0];return e}function yF(e,t,n){var r,o,i,a,s,l,c,u,f=e.d;for(a=1,i=f[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,c=f[u=0];else{if((u=Math.ceil((r+1)/7))>=(i=f.length))return e;for(c=i=f[u],a=1;i>=10;i/=10)a++;o=(r%=7)-7+a}if(void 0!==n&&(s=c/(i=eF(10,a-o-1))%10|0,l=t<0||void 0!==f[u+1]||c%i,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?o>0?c/eF(10,a-o):0:f[u-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(i=fF(e),f.length=1,t=t-i-1,f[0]=eF(10,(7-t%7)%7),e.e=QB(-t/7)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(0==r?(f.length=u,i=1,u--):(f.length=u+1,i=eF(10,7-r),f[u]=o>0?(c/eF(10,a-o)%eF(10,o)|0)*i:0),l)for(;;){if(0==u){(f[0]+=i)==nF&&(f[0]=1,++e.e);break}if(f[u]+=i,f[u]!=nF)break;f[u--]=0,i=1}for(r=f.length;0===f[--r];)f.pop();if(XB&&(e.e>oF||e.e<-oF))throw Error(JB+fF(e));return e}function gF(e,t){var n,r,o,i,a,s,l,c,u,f,d=e.constructor,p=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),XB?yF(t,p):t;if(l=e.d,f=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((u=a<0)?(n=l,a=-a,s=f.length):(n=f,r=c,s=l.length),a>(o=Math.max(Math.ceil(p/7),s)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((u=(o=l.length)<(s=f.length))&&(s=o),o=0;o<s;o++)if(l[o]!=f[o]){u=l[o]<f[o];break}a=0}for(u&&(n=l,l=f,f=n,t.s=-t.s),s=l.length,o=f.length-s;o>0;--o)l[s++]=0;for(o=f.length;o>a;){if(l[--o]<f[o]){for(i=o;i&&0===l[--i];)l[i]=nF-1;--l[i],l[o]+=nF}l[o]-=f[o]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,XB?yF(t,p):t):new d(0)}function vF(e,t,n){var r,o=fF(e),i=lF(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+pF(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+pF(-o-1)+i,n&&(r=n-a)>0&&(i+=pF(r))):o>=a?(i+=pF(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+pF(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=pF(r))),e.s<0?"-"+i:i}function bF(e,t){if(e.length>t)return e.length=t,!0}function xF(e){if(!e||"object"!=typeof e)throw Error(GB+"Object expected");var t,n,r,o=["precision",1,YB,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(QB(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(ZB+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(ZB+n+": "+r);this[n]=new this(r)}return this}var wF=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(ZB+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):mF(t,e.toString())}if("string"!=typeof e)throw Error(ZB+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!tF.test(e))throw Error(ZB+e);mF(t,e)}if(i.prototype=iF,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=xF,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});HB=new wF(1);const _F=wF;function SF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var OF=function(e){return e},kF={"@@functional/placeholder":!0},jF=function(e){return e===kF},EF=function(e){return function t(){return 0===arguments.length||1===arguments.length&&jF(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},PF=function e(t,n){return 1===t?n:EF((function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];var a=o.filter((function(e){return e!==kF})).length;return a>=t?n.apply(void 0,o):e(t-a,EF((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i=o.map((function(e){return jF(e)?t.shift():e}));return n.apply(void 0,function(e){return function(e){if(Array.isArray(e))return SF(e)}(e)||function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return SF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SF(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i).concat(t))})))}))},CF=function(e){return PF(e.length,e)},TF=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},AF=CF((function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map((function(e){return t[e]})).map(e)})),MF=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},NF=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return t&&o.every((function(e,n){return e===t[n]}))||(t=o,n=e.apply(void 0,o)),n}};CF((function(e,t,n){var r=+e;return r+n*(+t-r)})),CF((function(e,t,n){var r=t-+e;return(n-e)/(r||1/0)})),CF((function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))}));const DF=function(e,t,n){for(var r=new _F(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i},IF=function(e){return 0===e?1:Math.floor(new _F(e).abs().log(10).toNumber())+1};function RF(e){return function(e){if(Array.isArray(e))return BF(e)}(e)||function(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}(e)||zF(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(typeof Symbol>"u")&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&null!=s.return&&s.return()}finally{if(o)throw i}}return n}}(e,t)||zF(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zF(e,t){if(e){if("string"==typeof e)return BF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return BF(e,t)}}function BF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FF(e){var t=LF(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function WF(e,t,n){if(e.lte(0))return new _F(0);var r=IF(e.toNumber()),o=new _F(10).pow(r),i=e.div(o),a=1!==r?.05:.1,s=new _F(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return t?s:new _F(Math.ceil(s))}function VF(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new _F(0),tickMin:new _F(0),tickMax:new _F(0)};var i,a=WF(new _F(t).sub(e).div(n-1),r,o);i=e<=0&&t>=0?new _F(0):(i=new _F(e).add(t).div(2)).sub(new _F(i).mod(a));var s=Math.ceil(i.sub(e).div(a).toNumber()),l=Math.ceil(new _F(t).sub(i).div(a).toNumber()),c=s+l+1;return c>n?VF(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:i.sub(new _F(s).mul(a)),tickMax:i.add(new _F(l).mul(a))})}var $F=NF((function(e){var t=LF(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=Math.max(o,2),s=LF(FF([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var u=c===1/0?[l].concat(RF(TF(0,o-1).map((function(){return 1/0})))):[].concat(RF(TF(0,o-1).map((function(){return-1/0}))),[c]);return n>r?MF(u):u}if(l===c)return function(e,t,n){var r=1,o=new _F(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new _F(10).pow(IF(e)-1),o=new _F(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new _F(Math.floor(e)))}else 0===e?o=new _F(Math.floor((t-1)/2)):n||(o=new _F(Math.floor(e)));var a=Math.floor((t-1)/2),s=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return OF;var r=t.reverse(),o=r[0],i=r.slice(1);return function(){return i.reduce((function(e,t){return t(e)}),o.apply(void 0,arguments))}}(AF((function(e){return o.add(new _F(e-a).mul(r)).toNumber()})),TF);return s(0,t)}(l,o,i);var f=VF(l,c,a,i),d=f.step,p=f.tickMin,h=f.tickMax,m=DF(p,h.add(new _F(.1).mul(d)),d);return n>r?MF(m):m})),UF=NF((function(e,t){var n=LF(e,2),r=n[0],o=n[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=LF(FF([r,o]),2),s=a[0],l=a[1];if(s===-1/0||l===1/0)return[r,o];if(s===l)return[s];var c=Math.max(t,2),u=WF(new _F(l).sub(s).div(c-1),i,0),f=[].concat(RF(DF(new _F(s),new _F(l).sub(new _F(.99).mul(u)),u)),[l]);return r>o?MF(f):f}));function KF(e,t){throw new Error("Invariant failed")}var qF=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function HF(e){return(HF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function YF(){return YF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YF.apply(this,arguments)}function XF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(GF=function(){return!!e})()}function ZF(e){return(ZF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function JF(e,t){return(JF=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function QF(e,t,n){return(t=eW(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eW(e){var t=function(e){if("object"!=HF(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=HF(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==HF(t)?t:t+""}var tW=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=ZF(t),function(e,t){if(t&&("object"===HF(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GF()?Reflect.construct(t,n||[],ZF(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&JF(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eW(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,o=e.dataKey,i=e.data,a=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,qF),u=Aj(c,!1);"x"===this.props.direction&&"number"!==s.type&&KF();var d=i.map((function(e){var i=a(e,o),c=i.x,d=i.y,p=i.value,h=i.errorVal;if(!h)return null;var m,y,g=[];if(Array.isArray(h)){var v=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return XF(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XF(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h,2);m=v[0],y=v[1]}else m=y=h;if("vertical"===n){var b=s.scale,x=d+t,w=x+r,_=x-r,S=b(p-m),O=b(p+y);g.push({x1:O,y1:w,x2:O,y2:_}),g.push({x1:S,y1:x,x2:O,y2:x}),g.push({x1:S,y1:w,x2:S,y2:_})}else if("horizontal"===n){var k=l.scale,j=c+t,E=j-r,P=j+r,C=k(p-m),T=k(p+y);g.push({x1:E,y1:T,x2:P,y2:T}),g.push({x1:j,y1:C,x2:j,y2:T}),g.push({x1:E,y1:C,x2:P,y2:C})}return f.createElement(Wj,YF({className:"recharts-errorBar",key:"bar-".concat(g.map((function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)})))},u),g.map((function(e){return f.createElement("line",YF({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))})))}));return f.createElement(Wj,{className:"recharts-errorBars"},d)}}])}(f.Component);function nW(e){return(nW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rW(Object(n),!0).forEach((function(t){iW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function iW(e,t,n){return t=function(e){var t=function(e){if("object"!=nW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}QF(tW,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),QF(tW,"displayName","ErrorBar");var aW=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,o=e.legendContent,i=Ej(t,uM);if(!i)return null;var a,s=uM.defaultProps,l=void 0!==s?oW(oW({},s),i.props):{};return a=i.props&&i.props.payload?i.props&&i.props.payload:"children"===o?(n||[]).reduce((function(e,t){var n=t.item,r=t.props,o=r.sectors||r.data||[];return e.concat(o.map((function(e){return{type:i.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}})))}),[]):(n||[]).map((function(e){var t=e.item,n=t.type.defaultProps,r=void 0!==n?oW(oW({},n),t.props):{},o=r.dataKey,i=r.name,a=r.legendType;return{inactive:r.hide,dataKey:o,type:l.iconType||a||"square",color:mW(t),value:i||o,payload:r}})),oW(oW(oW({},l),uM.getWithHeight(i,r)),{},{payload:a,item:i})};function sW(e){return(sW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lW(e){return function(e){if(Array.isArray(e))return cW(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return cW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cW(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uW(Object(n),!0).forEach((function(t){dW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function dW(e,t,n){return t=function(e){var t=function(e){if("object"!=sW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pW(e,t,n){return Rk(e)||Rk(t)?n:nj(t)?Dk(e,t,n):GS(t)?t(e):n}function hW(e,t,n,r){var o=$B(e,(function(e){return pW(e,t)}));if("number"===n){var i=o.filter((function(e){return tj(e)||parseFloat(e)}));return i.length?[IB(i),CB(i)]:[1/0,-1/0]}return(r?o.filter((function(e){return!Rk(e)})):o).map((function(e){return nj(e)||e instanceof Date?e:""}))}var mW=function(e){var t,n,r=e.type.displayName,o=null!==(t=e.type)&&void 0!==t&&t.defaultProps?fW(fW({},e.type.defaultProps),e.props):e.props,i=o.stroke,a=o.fill;switch(r){case"Line":n=i;break;case"Area":case"Radar":n=i&&"none"!==i?i:a;break;default:n=a}return n},yW=function(e,t,n,r,o){var i=jj(t.props.children,tW).filter((function(e){return function(e,t,n){return!!Rk(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,o,e.props.direction)}));if(i&&i.length){var a=i.map((function(e){return e.props.dataKey}));return e.reduce((function(e,t){var r=pW(t,n);if(Rk(r))return e;var o=Array.isArray(r)?[IB(r),CB(r)]:[r,r],i=a.reduce((function(e,n){var r=pW(t,n,0),i=o[0]-Math.abs(Array.isArray(r)?r[0]:r),a=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(i,e[0]),Math.max(a,e[1])]}),[1/0,-1/0]);return[Math.min(i[0],e[0]),Math.max(i[1],e[1])]}),[1/0,-1/0])}return null},gW=function(e,t,n,r,o){var i=t.map((function(t){var i=t.props.dataKey;return"number"===n&&i&&yW(e,t,i,r)||hW(e,i,n,o)}));if("number"===n)return i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]);var a={};return i.reduce((function(e,t){for(var n=0,r=t.length;n<r;n++)a[t[n]]||(a[t[n]]=!0,e.push(t[n]));return e}),[])},vW=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},bW=function(e,t,n){if(!e)return null;var r=e.scale,o=e.duplicateDomain,i=e.type,a=e.range,s="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===i&&r.bandwidth?r.bandwidth()/s:0;return l="angleAxis"===e.axisType&&(null==a?void 0:a.length)>=2?2*Qk(a[0]-a[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map((function(e){var t=o?o.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}})).filter((function(e){return!Jk(e.coordinate)})):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map((function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}})):r.ticks&&!n?r.ticks(e.tickCount).map((function(e){return{coordinate:r(e)+l,value:e,offset:l}})):r.domain().map((function(e,t){return{coordinate:r(e)+l,value:o?o[e]:e,index:t,offset:l}}))},xW=new WeakMap,wW=function(e,t){if("function"!=typeof t)return e;xW.has(e)||xW.set(e,new WeakMap);var n=xW.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},_W=function(e,t,n){var r=e.scale,o=e.type,i=e.layout,a=e.axisType;if("auto"===r)return"radial"===i&&"radiusAxis"===a?{scale:mI(),realScaleType:"band"}:"radial"===i&&"angleAxis"===a?{scale:RR(),realScaleType:"linear"}:"category"===o&&t&&(t.indexOf("LineChart")>=0||t.indexOf("AreaChart")>=0||t.indexOf("ComposedChart")>=0&&!n)?{scale:gI(),realScaleType:"point"}:"category"===o?{scale:mI(),realScaleType:"band"}:{scale:RR(),realScaleType:"linear"};if(Wk(r)){var s="scale".concat(fE(r));return{scale:(wB[s]||gI)(),realScaleType:wB[s]?s:"point"}}return GS(r)?{scale:r}:{scale:gI(),realScaleType:"point"}},SW=1e-4,OW=function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-SW,i=Math.max(r[0],r[1])+SW,a=e(t[0]),s=e(t[n-1]);(a<o||a>i||s<o||s>i)&&e.domain([t[0],t[n-1]])}},kW={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0,a=0;a<t;++a){var s=Jk(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1]):(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}dP(e,t)}},none:dP,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}dP(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],f=u[a][1]||0,d=(f-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];d+=(h[a][1]||0)-(h[a-1][1]||0)}l+=f,c+=d*f}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,dP(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,i=0;i<t;++i){var a=Jk(e[i][n][1])?e[i][n][0]:e[i][n][1];a>=0?(e[i][n][0]=o,e[i][n][1]=o+a,o=e[i][n][1]):(e[i][n][0]=0,e[i][n][1]=0)}}},jW=function(e,t,n){var r=t.map((function(e){return e.props.dataKey})),o=kW[n],i=function(){var e=dE([]),t=pP,n=dP,r=hP;function o(o){var i,a,s=Array.from(e.apply(this,arguments),mP),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=kE(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:dE(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:dE(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?pP:"function"==typeof e?e:dE(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=e??dP,o):n},o}().keys(r).value((function(e,t){return+pW(e,t,0)})).order(pP).offset(o);return i(e)},EW=function(e,t){var n=t.realScaleType,r=t.type,o=t.tickCount,i=t.originalDomain,a=t.allowDecimals,s=n||t.scale;if("auto"!==s&&"linear"!==s)return null;if(o&&"number"===r&&i&&("auto"===i[0]||"auto"===i[1])){var l=e.domain();if(!l.length)return null;var c=$F(l,o,a);return e.domain([IB(c),CB(c)]),{niceTicks:c}}if(o&&"number"===r){var u=e.domain();return{niceTicks:UF(u,o,a)}}return null};function PW(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Rk(o[t.dataKey])){var s=lj(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=pW(o,Rk(a)?t.dataKey:a);return Rk(l)?null:t.scale(l)}var CW=function(e){var t=e.axis,n=e.ticks,r=e.offset,o=e.bandSize,i=e.entry,a=e.index;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=pW(i,t.dataKey,t.domain[a]);return Rk(s)?null:t.scale(s)-o/2+r},TW=function(e,t,n){return Object.keys(e).reduce((function(r,o){var i=e[o].stackedData.reduce((function(e,r){var o=function(e){return e.reduce((function(e,t){return[IB(t.concat([e[0]]).filter(tj)),CB(t.concat([e[1]]).filter(tj))]}),[1/0,-1/0])}(r.slice(t,n+1));return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]}),[1/0,-1/0]);return[Math.min(i[0],r[0]),Math.max(i[1],r[1])]}),[1/0,-1/0]).map((function(e){return e===1/0||e===-1/0?0:e}))},AW=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,MW=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,NW=function(e,t,n){if(GS(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(tj(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(AW.test(e[0])){var o=+AW.exec(e[0])[1];r[0]=t[0]-o}else GS(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(tj(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(MW.test(e[1])){var i=+MW.exec(e[1])[1];r[1]=t[1]+i}else GS(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},DW=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=iN(t,(function(e){return e.coordinate})),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],c=o[a-1];i=Math.min((l.coordinate||0)-(c.coordinate||0),i)}return i===1/0?0:i}return n?void 0:0},IW=function(e,t,n){return e&&e.length&&!qB(e,Dk(n,"type.defaultProps.domain"))?e:t},RW=function(e,t){var n=e.type.defaultProps?fW(fW({},e.type.defaultProps),e.props):e.props,r=n.dataKey,o=n.name,i=n.unit,a=n.formatter,s=n.tooltipType,l=n.chartType,c=n.hide;return fW(fW({},Aj(e,!1)),{},{dataKey:r,unit:i,formatter:a,name:o||r,color:mW(e),value:pW(t,r),type:s,payload:t,chartType:l,hide:c})};function LW(e){return(LW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function BW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zW(Object(n),!0).forEach((function(t){FW(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function FW(e,t,n){return t=function(e){var t=function(e){if("object"!=LW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=LW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==LW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var VW=Math.PI/180,$W=function(e){return 180*e/Math.PI},UW=function(e,t,n,r){return{x:e+Math.cos(-VW*r)*n,y:t+Math.sin(-VW*r)*n}},KW=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2},qW=function(e,t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},HW=function(e,t){var n=function(e,t){var n=e.x,r=e.y,o=t.cx,i=t.cy,a=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(r-i,2))}({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a};var s=(n-o)/a,l=Math.acos(s);return r>i&&(l=2*Math.PI-l),{radius:a,angle:$W(l),angleInRadian:l}}({x:e.x,y:e.y},t),r=n.radius,o=n.angle,i=t.innerRadius,a=t.outerRadius;if(r<i||r>a)return!1;if(0===r)return!0;var s,l=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}}(t),c=l.startAngle,u=l.endAngle,f=o;if(c<=u){for(;f>u;)f-=360;for(;f<c;)f+=360;s=f>=c&&f<=u}else{for(;f>c;)f-=360;for(;f<u;)f+=360;s=f>=u&&f<=c}return s?BW(BW({},t),{},{radius:r,angle:qW(f,t)}):null},YW=function(e){return(0,f.isValidElement)(e)||GS(e)||"boolean"==typeof e?"":e.className};function XW(e){return(XW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var GW=["offset"];function ZW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JW(Object(n),!0).forEach((function(t){eV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JW(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eV(e,t,n){return t=function(e){var t=function(e){if("object"!=XW(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=XW(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==XW(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tV(){return tV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tV.apply(this,arguments)}function nV(e){var t,n=e.offset,r=QW({offset:void 0===n?5:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,GW)),o=r.viewBox,i=r.position,a=r.value,s=r.children,l=r.content,c=r.className,u=void 0===c?"":c,d=r.textBreakAll;if(!o||Rk(a)&&Rk(s)&&!(0,f.isValidElement)(l)&&!GS(l))return null;if((0,f.isValidElement)(l))return(0,f.cloneElement)(l,r);if(GS(l)){if(t=(0,f.createElement)(l,r),(0,f.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=Rk(e.children)?t:e.children;return GS(n)?n(r):r}(r);var p=function(e){return"cx"in e&&tj(e.cx)}(o),h=Aj(r,!0);if(p&&("insideStart"===i||"insideEnd"===i||"end"===i))return function(e,t,n){var r,o,i=e.position,a=e.viewBox,s=e.offset,l=e.className,c=a,u=c.cx,d=c.cy,p=c.innerRadius,h=c.outerRadius,m=c.startAngle,y=c.endAngle,g=c.clockWise,v=(p+h)/2,b=function(e,t){return Qk(t-e)*Math.min(Math.abs(t-e),360)}(m,y),x=b>=0?1:-1;"insideStart"===i?(r=m+x*s,o=g):"insideEnd"===i?(r=y-x*s,o=!g):"end"===i&&(r=y+x*s,o=g),o=b<=0?o:!o;var w=UW(u,d,v,r),_=UW(u,d,v,r+359*(o?1:-1)),S="M".concat(w.x,",").concat(w.y,"\n A").concat(v,",").concat(v,",0,1,").concat(o?0:1,",\n ").concat(_.x,",").concat(_.y),O=Rk(e.id)?oj("recharts-radial-line-"):e.id;return f.createElement("text",tV({},n,{dominantBaseline:"central",className:ge("recharts-radial-bar-label",l)}),f.createElement("defs",null,f.createElement("path",{id:O,d:S})),f.createElement("textPath",{xlinkHref:"#".concat(O)},t))}(r,t,h);var m=p?function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t,i=o.cx,a=o.cy,s=o.innerRadius,l=o.outerRadius,c=(o.startAngle+o.endAngle)/2;if("outside"===r){var u=UW(i,a,l+n,c),f=u.x;return{x:f,y:u.y,textAnchor:f>=i?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:i,y:a,textAnchor:"middle",verticalAnchor:"end"};var d=UW(i,a,(s+l)/2,c);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}}(r):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,i=t,a=i.x,s=i.y,l=i.width,c=i.height,u=c>=0?1:-1,f=u*r,d=u>0?"end":"start",p=u>0?"start":"end",h=l>=0?1:-1,m=h*r,y=h>0?"end":"start",g=h>0?"start":"end";if("top"===o)return QW(QW({},{x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:d}),n?{height:Math.max(s-n.y,0),width:l}:{});if("bottom"===o)return QW(QW({},{x:a+l/2,y:s+c+f,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+c),0),width:l}:{});if("left"===o){var v={x:a-m,y:s+c/2,textAnchor:y,verticalAnchor:"middle"};return QW(QW({},v),n?{width:Math.max(v.x-n.x,0),height:c}:{})}if("right"===o){var b={x:a+l+m,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return QW(QW({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:c}:{})}var x=n?{width:l,height:c}:{};return"insideLeft"===o?QW({x:a+m,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},x):"insideRight"===o?QW({x:a+l-m,y:s+c/2,textAnchor:y,verticalAnchor:"middle"},x):"insideTop"===o?QW({x:a+l/2,y:s+f,textAnchor:"middle",verticalAnchor:p},x):"insideBottom"===o?QW({x:a+l/2,y:s+c-f,textAnchor:"middle",verticalAnchor:d},x):"insideTopLeft"===o?QW({x:a+m,y:s+f,textAnchor:g,verticalAnchor:p},x):"insideTopRight"===o?QW({x:a+l-m,y:s+f,textAnchor:y,verticalAnchor:p},x):"insideBottomLeft"===o?QW({x:a+m,y:s+c-f,textAnchor:g,verticalAnchor:d},x):"insideBottomRight"===o?QW({x:a+l-m,y:s+c-f,textAnchor:y,verticalAnchor:d},x):qS(o)&&(tj(o.x)||ej(o.x))&&(tj(o.y)||ej(o.y))?QW({x:a+ij(o.x,l),y:s+ij(o.y,c),textAnchor:"end",verticalAnchor:"end"},x):QW({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},x)}(r);return f.createElement(VD,tV({className:ge("recharts-label",u)},h,m,{breakAll:d}),t)}nV.displayName="Label";var rV=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,i=e.endAngle,a=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,f=e.y,d=e.top,p=e.left,h=e.width,m=e.height,y=e.clockWise,g=e.labelViewBox;if(g)return g;if(tj(h)&&tj(m)){if(tj(u)&&tj(f))return{x:u,y:f,width:h,height:m};if(tj(d)&&tj(p))return{x:d,y:p,width:h,height:m}}return tj(u)&&tj(f)?{x:u,y:f,width:0,height:0}:tj(t)&&tj(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:i||r||0,innerRadius:l||0,outerRadius:c||s||a||0,clockWise:y}:e.viewBox?e.viewBox:{}};nV.parseViewBox=rV,nV.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=rV(e),i=jj(r,nV).map((function(e,n){return(0,f.cloneElement)(e,{viewBox:t||o,key:"label-".concat(n)})}));if(!n)return i;var a=function(e,t){return e?!0===e?f.createElement(nV,{key:"label-implicit",viewBox:t}):nj(e)?f.createElement(nV,{key:"label-implicit",viewBox:t,value:e}):(0,f.isValidElement)(e)?e.type===nV?(0,f.cloneElement)(e,{key:"label-implicit",viewBox:t}):f.createElement(nV,{key:"label-implicit",content:e,viewBox:t}):GS(e)?f.createElement(nV,{key:"label-implicit",content:e,viewBox:t}):qS(e)?f.createElement(nV,tV({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||o);return[a].concat(function(e){return function(e){if(Array.isArray(e))return ZW(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return ZW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ZW(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i))};var oV=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const iV=m(oV);function aV(e){return(aV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var sV=["valueAccessor"],lV=["data","dataKey","clockWise","id","textBreakAll"];function cV(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uV(){return uV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uV.apply(this,arguments)}function fV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fV(Object(n),!0).forEach((function(t){pV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pV(e,t,n){return t=function(e){var t=function(e){if("object"!=aV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=aV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==aV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hV(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mV=function(e){return Array.isArray(e.value)?iV(e.value):e.value};function yV(e){var t=e.valueAccessor,n=void 0===t?mV:t,r=hV(e,sV),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=hV(r,lV);return o&&o.length?f.createElement(Wj,{className:"recharts-label-list"},o.map((function(e,t){var r=Rk(i)?n(e,t):pW(e&&e.payload,i),o=Rk(s)?{}:{id:"".concat(s,"-").concat(t)};return f.createElement(nV,uV({},Aj(e,!0),c,o,{parentViewBox:e.parentViewBox,value:r,textBreakAll:l,viewBox:nV.parseViewBox(Rk(a)?e:dV(dV({},e),{},{clockWise:a})),key:"label-".concat(t),index:t}))}))):null}function gV(e){return(gV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vV(){return vV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vV.apply(this,arguments)}function bV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bV(Object(n),!0).forEach((function(t){wV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wV(e,t,n){return t=function(e){var t=function(e){if("object"!=gV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}yV.displayName="LabelList",yV.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=jj(e.children,yV).map((function(e,n){return(0,f.cloneElement)(e,{data:t,key:"labelList-".concat(n)})}));if(!n)return r;var o=function(e,t){return e?!0===e?f.createElement(yV,{key:"labelList-implicit",data:t}):f.isValidElement(e)||GS(e)?f.createElement(yV,{key:"labelList-implicit",data:t,content:e}):qS(e)?f.createElement(yV,uV({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t);return[o].concat(function(e){return function(e){if(Array.isArray(e))return cV(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return cV(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return cV(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r))};var _V=function(e){var t=e.cx,n=e.cy,r=e.radius,o=e.angle,i=e.sign,a=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(a?1:-1)+r,u=Math.asin(s/c)/VW,f=l?o:o+i*u,d=l?o-i*u:o;return{center:UW(t,n,c,f),circleTangency:UW(t,n,r,f),lineTangency:UW(t,n,c*Math.cos(u*VW),d),theta:u}},SV=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.startAngle,a=function(e,t){return Qk(t-e)*Math.min(Math.abs(t-e),359.999)}(i,e.endAngle),s=i+a,l=UW(t,n,o,i),c=UW(t,n,o,s),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i>s),",\n ").concat(c.x,",").concat(c.y,"\n ");if(r>0){var f=UW(t,n,r,i),d=UW(t,n,r,s);u+="L ".concat(d.x,",").concat(d.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(a)>180),",").concat(+(i<=s),",\n ").concat(f.x,",").concat(f.y," Z")}else u+="L ".concat(t,",").concat(n," Z");return u},OV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},kV=function(e){var t=xV(xV({},OV),e),n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=t.className;if(i<o||c===u)return null;var p,h=ge("recharts-sector",d),m=i-o,y=ij(a,m,0,!0);return p=y>0&&Math.abs(c-u)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,i=e.cornerRadius,a=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=Qk(c-l),f=_V({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),d=f.circleTangency,p=f.lineTangency,h=f.theta,m=_V({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),y=m.circleTangency,g=m.lineTangency,v=m.theta,b=s?Math.abs(l-c):Math.abs(l-c)-h-v;if(b<0)return a?"M ".concat(p.x,",").concat(p.y,"\n a").concat(i,",").concat(i,",0,0,1,").concat(2*i,",0\n a").concat(i,",").concat(i,",0,0,1,").concat(2*-i,",0\n "):SV({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var x="M ".concat(p.x,",").concat(p.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(d.x,",").concat(d.y,"\n A").concat(o,",").concat(o,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n ");if(r>0){var w=_V({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),_=w.circleTangency,S=w.lineTangency,O=w.theta,k=_V({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),j=k.circleTangency,E=k.lineTangency,P=k.theta,C=s?Math.abs(l-c):Math.abs(l-c)-O-P;if(C<0&&0===i)return"".concat(x,"L").concat(t,",").concat(n,"Z");x+="L".concat(E.x,",").concat(E.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(j.x,",").concat(j.y,"\n A").concat(r,",").concat(r,",0,").concat(+(C>180),",").concat(+(u>0),",").concat(_.x,",").concat(_.y,"\n A").concat(i,",").concat(i,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,"Z")}else x+="L".concat(t,",").concat(n,"Z");return x}({cx:n,cy:r,innerRadius:o,outerRadius:i,cornerRadius:Math.min(y,m/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):SV({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u}),f.createElement("path",vV({},Aj(t,!0),{className:h,d:p,role:"img"}))};function jV(e){return(jV="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EV(){return EV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EV.apply(this,arguments)}function PV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PV(Object(n),!0).forEach((function(t){TV(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TV(e,t,n){return t=function(e){var t=function(e){if("object"!=jV(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=jV(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==jV(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AV,MV,NV,DV,IV={curveBasisClosed:function(e){return new QE(e)},curveBasisOpen:function(e){return new eP(e)},curveBasis:function(e){return new JE(e)},curveBumpX:function(e){return new ME(e,!0)},curveBumpY:function(e){return new ME(e,!1)},curveLinearClosed:function(e){return new tP(e)},curveLinear:EE,curveMonotoneX:function(e){return new aP(e)},curveMonotoneY:function(e){return new sP(e)},curveNatural:function(e){return new cP(e)},curveStep:function(e){return new fP(e,.5)},curveStepAfter:function(e){return new fP(e,1)},curveStepBefore:function(e){return new fP(e,0)}},RV=function(e){return e.x===+e.x&&e.y===+e.y},LV=function(e){return e.x},zV=function(e){return e.y},BV=function(e){var t=e.className,n=e.points,r=e.path,o=e.pathRef;if(!(n&&n.length||r))return null;var i=n&&n.length?function(e){var t,n=e.type,r=void 0===n?"linear":n,o=e.points,i=void 0===o?[]:o,a=e.baseLine,s=e.layout,l=e.connectNulls,c=void 0!==l&&l,u=function(e,t){if(GS(e))return e;var n="curve".concat(fE(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?IV[n]||EE:IV["".concat(n).concat("vertical"===t?"Y":"X")]}(r,s),f=c?i.filter((function(e){return RV(e)})):i;if(Array.isArray(a)){var d=c?a.filter((function(e){return RV(e)})):a,p=f.map((function(e,t){return CV(CV({},e),{},{base:d[t]})}));return(t="vertical"===s?AE().y(zV).x1(LV).x0((function(e){return e.base.x})):AE().x(LV).y1(zV).y0((function(e){return e.base.y}))).defined(RV).curve(u),t(p)}return(t="vertical"===s&&tj(a)?AE().y(zV).x1(LV).x0(a):tj(a)?AE().x(LV).y1(zV).y0(a):TE().x(LV).y(zV)).defined(RV).curve(u),t(f)}(e):r;return f.createElement("path",EV({},Aj(e,!1),mj(e),{className:ge("recharts-curve",t),d:i,ref:o}))},FV={exports:{}};FV.exports=function(){if(DV)return NV;DV=1;var e=MV?AV:(MV=1,AV="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,NV=function(){function r(t,n,r,o,i,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();const WV=m(FV.exports);var VV=Object.getOwnPropertyNames,$V=Object.getOwnPropertySymbols,UV=Object.prototype.hasOwnProperty;function KV(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function qV(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);var o=r.cache,i=o.get(t),a=o.get(n);if(i&&a)return i===n&&a===t;o.set(t,n),o.set(n,t);var s=e(t,n,r);return o.delete(t),o.delete(n),s}}function HV(e){return VV(e).concat($V(e))}var YV=Object.hasOwn||function(e,t){return UV.call(e,t)};function XV(e,t){return e||t?e===t:e===t||e!=e&&t!=t}var GV="_owner",ZV=Object.getOwnPropertyDescriptor,JV=Object.keys;function QV(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function e$(e,t){return XV(e.getTime(),t.getTime())}function t$(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.entries(),s=0;(r=a.next())&&!r.done;){for(var l=t.entries(),c=!1,u=0;(o=l.next())&&!o.done;){var f=r.value,d=f[0],p=f[1],h=o.value,m=h[0],y=h[1];!c&&!i[u]&&(c=n.equals(d,m,s,u,e,t,n)&&n.equals(p,y,d,m,e,t,n))&&(i[u]=!0),u++}if(!c)return!1;s++}return!0}function n$(e,t,n){var r,o=JV(e),i=o.length;if(JV(t).length!==i)return!1;for(;i-- >0;)if((r=o[i])===GV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!YV(t,r)||!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function r$(e,t,n){var r,o,i,a=HV(e),s=a.length;if(HV(t).length!==s)return!1;for(;s-- >0;)if((r=a[s])===GV&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!YV(t,r)||!n.equals(e[r],t[r],r,r,e,t,n)||(o=ZV(e,r),i=ZV(t,r),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable)))return!1;return!0}function o$(e,t){return XV(e.valueOf(),t.valueOf())}function i$(e,t){return e.source===t.source&&e.flags===t.flags}function a$(e,t,n){if(e.size!==t.size)return!1;for(var r,o,i={},a=e.values();(r=a.next())&&!r.done;){for(var s=t.values(),l=!1,c=0;(o=s.next())&&!o.done;)!l&&!i[c]&&(l=n.equals(r.value,o.value,r.value,o.value,e,t,n))&&(i[c]=!0),c++;if(!l)return!1}return!0}function s$(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var l$=Array.isArray,c$="function"==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView:null,u$=Object.assign,f$=Object.prototype.toString.call.bind(Object.prototype.toString),d$=p$();function p$(e){void 0===e&&(e={});var t=e.circular,n=void 0!==t&&t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=void 0!==i&&i,s=function(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?r$:QV,areDatesEqual:e$,areMapsEqual:r?KV(t$,r$):t$,areObjectsEqual:r?r$:n$,arePrimitiveWrappersEqual:o$,areRegExpsEqual:i$,areSetsEqual:r?KV(a$,r$):a$,areTypedArraysEqual:r?r$:s$};if(n&&(o=u$({},o,n(o))),t){var i=qV(o.areArraysEqual),a=qV(o.areMapsEqual),s=qV(o.areObjectsEqual),l=qV(o.areSetsEqual);o=u$({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}(e),l=function(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(e,c,u){if(e===c)return!0;if(null==e||null==c||"object"!=typeof e||"object"!=typeof c)return e!=e&&c!=c;var f=e.constructor;if(f!==c.constructor)return!1;if(f===Object)return o(e,c,u);if(l$(e))return t(e,c,u);if(null!=c$&&c$(e))return l(e,c,u);if(f===Date)return n(e,c,u);if(f===RegExp)return a(e,c,u);if(f===Map)return r(e,c,u);if(f===Set)return s(e,c,u);var d=f$(e);return"[object Date]"===d?n(e,c,u):"[object RegExp]"===d?a(e,c,u):"[object Map]"===d?r(e,c,u):"[object Set]"===d?s(e,c,u):"[object Object]"===d?"function"!=typeof e.then&&"function"!=typeof c.then&&o(e,c,u):"[object Arguments]"===d?o(e,c,u):("[object Boolean]"===d||"[object Number]"===d||"[object String]"===d)&&i(e,c,u)}}(s),c=r?r(l):function(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}(l);return function(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(e,a){var s=r(),l=s.cache,c=void 0===l?t?new WeakMap:void 0:l,u=s.meta;return n(e,a,{cache:c,equals:o,meta:u,strict:i})};if(t)return function(e,t){return n(e,t,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(e,t){return n(e,t,a)}}({circular:n,comparator:l,createState:o,equals:c,strict:a})}function h$(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame((function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}(r)}))}function m$(e){return(m$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g$(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y$(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r),i=o[0],a=o.slice(1);return"number"==typeof i?void h$(n.bind(null,a),i):(n(i),void h$(n.bind(null,a)))}"object"===m$(r)&&e(r),"function"==typeof r&&r()}};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function v$(e){return(v$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b$(Object(n),!0).forEach((function(t){w$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w$(e,t,n){return t=function(e){var t=function(e){if("object"!==v$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==v$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v$(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}p$({strict:!0}),p$({circular:!0}),p$({circular:!0,strict:!0}),p$({createInternalComparator:function(){return XV}}),p$({strict:!0,createInternalComparator:function(){return XV}}),p$({circular:!0,createInternalComparator:function(){return XV}}),p$({circular:!0,createInternalComparator:function(){return XV},strict:!0});var _$=function(e){return e},S$=function(e,t){return Object.keys(t).reduce((function(n,r){return x$(x$({},n),{},w$({},r,e(r,t[r])))}),{})},O$=function(e,t,n){return e.map((function(e){return"".concat(function(e){return e.replace(/([A-Z])/g,(function(e){return"-".concat(e.toLowerCase())}))}(e)," ").concat(t,"ms ").concat(n)})).join(",")};function k$(e,t){if(e){if("string"==typeof e)return j$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j$(e,t)}}function j$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var E$=1e-4,P$=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},C$=function(e,t){return e.map((function(e,n){return e*Math.pow(t,n)})).reduce((function(e,t){return e+t}))},T$=function(e,t){return function(n){var r=P$(e,t);return C$(r,n)}},A$=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,i=1,a=1;break;case"ease":r=.25,o=.1,i=.25,a=1;break;case"ease-in":r=.42,o=0,i=1,a=1;break;case"ease-out":r=.42,o=0,i=.58,a=1;break;case"ease-in-out":r=0,o=0,i=.58,a=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||k$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(s[1].split(")")[0].split(",").map((function(e){return parseFloat(e)})),4);r=l[0],o=l[1],i=l[2],a=l[3]}}[r,i,o,a].every((function(e){return"number"==typeof e&&e>=0&&e<=1}));var c=T$(r,i),u=T$(o,a),f=function(e,t){return function(n){var r=P$(e,t),o=[].concat(function(e){return function(e){if(Array.isArray(e))return j$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||k$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r.map((function(e,t){return e*t})).slice(1)),[0]);return C$(o,n)}}(r,i),d=function(e){return e>1?1:e<0?0:e},p=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=c(n)-t,i=f(n);if(Math.abs(o-t)<E$||i<E$)return u(n);n=d(n-o/i)}return u(n)};return p.isStepper=!1,p};function M$(e){return(M$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function N$(e){return function(e){if(Array.isArray(e))return z$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L$(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D$(Object(n),!0).forEach((function(t){R$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R$(e,t,n){return t=function(e){var t=function(e){if("object"!==M$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==M$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===M$(t)?t:String(t)}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function L$(e,t){if(e){if("string"==typeof e)return z$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z$(e,t)}}function z$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var B$=function(e,t,n){return e+(t-e)*n},F$=function(e){return e.from!==e.to},W$=function e(t,n,r){var o=S$((function(e,n){if(F$(n)){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||L$(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t(n.from,n.to,n.velocity),2),o=r[0],i=r[1];return I$(I$({},n),{},{from:o,velocity:i})}return n}),n);return r<1?S$((function(e,t){return F$(t)?I$(I$({},t),{},{velocity:B$(t.velocity,o[e].velocity,r),from:B$(t.from,o[e].from,r)}):t}),n):e(t,o,r-1)};function V$(e){return(V$="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $$=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function U$(e){return function(e){if(Array.isArray(e))return K$(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return K$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K$(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function K$(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q$(Object(n),!0).forEach((function(t){Y$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Y$(e,t,n){return(t=X$(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function X$(e){var t=function(e){if("object"!==V$(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==V$(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===V$(t)?t:String(t)}function G$(e,t){return(G$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Z$(e,t){if(t&&("object"===V$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return J$(e)}function J$(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q$(e){return(Q$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eU=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G$(e,t)}(n,e);var t=function(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}();return function(){var n,r=Q$(e);if(t){var o=Q$(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Z$(this,n)}}(n);function n(e,r){var o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var i=(o=t.call(this,e,r)).props,a=i.isActive,s=i.attributeName,l=i.from,c=i.to,u=i.steps,f=i.children,d=i.duration;if(o.handleStyleChange=o.handleStyleChange.bind(J$(o)),o.changeStyle=o.changeStyle.bind(J$(o)),!a||d<=0)return o.state={style:{}},"function"==typeof f&&(o.state={style:c}),Z$(o);if(u&&u.length)o.state={style:u[0].style};else if(l){if("function"==typeof f)return o.state={style:l},Z$(o);o.state={style:s?Y$({},s,l):l}}else o.state={style:{}};return o}return function(e,t){t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,X$(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,i=t.shouldReAnimate,a=t.to,s=t.from,l=this.state.style;if(r){if(!n){var c={style:o?Y$({},o,a):a};return void(this.state&&l&&(o&&l[o]!==a||!o&&l!==a)&&this.setState(c))}if(!(d$(e.to,a)&&e.canBegin&&e.isActive)){var u=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var f=u||i?s:e.to;if(this.state&&l){var d={style:o?Y$({},o,f):f};(o&&l[o]!==f||!o&&l!==f)&&this.setState(d)}this.runAnimation(H$(H$({},this.props),{},{from:f,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,i=e.easing,a=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=function(e,t,n,r,o){var i,a,s=function(e,t){return[Object.keys(e),Object.keys(t)].reduce((function(e,t){return e.filter((function(e){return t.includes(e)}))}))}(e,t),l=s.reduce((function(n,r){return I$(I$({},n),{},R$({},r,[e[r],t[r]]))}),{}),c=s.reduce((function(n,r){return I$(I$({},n),{},R$({},r,{from:e[r],velocity:0,to:t[r]}))}),{}),u=-1,f=function(){return null};return f=n.isStepper?function(r){i||(i=r);var a=(r-i)/n.dt;c=W$(n,c,a),o(I$(I$(I$({},e),t),S$((function(e,t){return t.from}),c))),i=r,!Object.values(c).filter(F$).length||(u=requestAnimationFrame(f))}:function(i){a||(a=i);var s=(i-a)/r,c=S$((function(e,t){return B$.apply(void 0,N$(t).concat([n(s)]))}),l);if(o(I$(I$(I$({},e),t),c)),s<1)u=requestAnimationFrame(f);else{var d=S$((function(e,t){return B$.apply(void 0,N$(t).concat([n(1)]))}),l);o(I$(I$(I$({},e),t),d))}},function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(u)}}}(n,r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return A$(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,i=e.dt,a=void 0===i?17:i,s=function(e,t,r){var i=r+(-(e-t)*n-r*o)*a/1e3,s=r*a/1e3+e;return Math.abs(s-t)<E$&&Math.abs(i)<E$?[t,0]:[s,i]};return s.isStepper=!0,s.dt=a,s}();default:if("cubic-bezier"===r.split("(")[0])return A$(r)}return"function"==typeof r?r:null}(i),o,this.changeStyle);this.manager.start([l,a,function(){t.stopJSAnimation=c()},o,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,i=n[0],a=i.style,s=i.duration,l=void 0===s?0:s;return this.manager.start([o].concat(U$(n.reduce((function(e,r,o){if(0===o)return e;var i=r.duration,a=r.easing,s=void 0===a?"ease":a,l=r.style,c=r.properties,u=r.onAnimationEnd,f=o>0?n[o-1]:r,d=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(U$(e),[t.runJSAnimation.bind(t,{from:f.style,to:l,duration:i,easing:s}),i]);var p=O$(d,i,s),h=H$(H$(H$({},f.style),l),{},{transition:p});return[].concat(U$(e),[h,i,u]).filter(_$)}),[a,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=g$());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,i=e.easing,a=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof i&&"function"!=typeof c&&"spring"!==i)if(l.length>1)this.runStepAnimation(e);else{var f=r?Y$({},r,o):o,d=O$(Object.keys(f),n,i);u.start([a,t,H$(H$({},f),{},{transition:d}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var e=this.props,t=e.children;e.begin;var n=e.duration;e.attributeName,e.easing;var r=e.isActive;e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart;var o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,$$),i=f.Children.count(t),a=this.state.style;if("function"==typeof t)return t(a);if(!r||0===i||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=void 0===n?{}:n,i=t.className;return(0,f.cloneElement)(e,H$(H$({},o),{},{style:H$(H$({},r),a),className:i}))};return 1===i?s(f.Children.only(t)):f.createElement("div",null,f.Children.map(t,(function(e){return s(e)})))}}]),n}(f.PureComponent);function tU(e){return(tU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nU(){return nU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nU.apply(this,arguments)}function rU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oU(Object(n),!0).forEach((function(t){aU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aU(e,t,n){return t=function(e){var t=function(e){if("object"!=tU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tU(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}eU.displayName="Animate",eU.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},eU.propTypes={from:WV.oneOfType([WV.object,WV.string]),to:WV.oneOfType([WV.object,WV.string]),attributeName:WV.string,duration:WV.number,begin:WV.number,easing:WV.oneOfType([WV.string,WV.func]),steps:WV.arrayOf(WV.shape({duration:WV.number.isRequired,style:WV.object.isRequired,easing:WV.oneOfType([WV.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),WV.func]),properties:WV.arrayOf("string"),onAnimationEnd:WV.func})),children:WV.oneOfType([WV.node,WV.func]),isActive:WV.bool,canBegin:WV.bool,onAnimationEnd:WV.func,shouldReAnimate:WV.bool,onAnimationStart:WV.func,onAnimationReStart:WV.func},WV.object,WV.object,WV.object,WV.element,WV.object,WV.object,WV.object,WV.oneOfType([WV.array,WV.element]),WV.any;var sU=function(e,t,n,r,o){var i,a=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(a>0&&o instanceof Array){for(var u=[0,0,0,0],f=0;f<4;f++)u[f]=o[f]>a?a:o[f];i="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(i+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),i+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(i+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),i+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(i+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),i+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(i+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),i+="Z"}else if(a>0&&o===+o&&o>0){var d=Math.min(a,o);i="M ".concat(e,",").concat(t+s*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(c,",").concat(e+l*d,",").concat(t,"\n L ").concat(e+n-l*d,",").concat(t,"\n A ").concat(d,",").concat(d,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*d,"\n L ").concat(e+n,",").concat(t+r-s*d,"\n A ").concat(d,",").concat(d,",0,0,").concat(c,",").concat(e+n-l*d,",").concat(t+r,"\n L ").concat(e+l*d,",").concat(t+r,"\n A ").concat(d,",").concat(d,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*d," Z")}else i="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return i},lU=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,i=t.y,a=t.width,s=t.height;if(Math.abs(a)>0&&Math.abs(s)>0){var l=Math.min(o,o+a),c=Math.max(o,o+a),u=Math.min(i,i+s),f=Math.max(i,i+s);return n>=l&&n<=c&&r>=u&&r<=f}return!1},cU={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},uU=function(e){var t=iU(iU({},cU),e),n=(0,f.useRef)(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return rU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rU(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,f.useState)(-1),2),o=r[0],i=r[1];(0,f.useEffect)((function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch{}}),[]);var a=t.x,s=t.y,l=t.width,c=t.height,u=t.radius,d=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,y=t.isAnimationActive,g=t.isUpdateAnimationActive;if(a!==+a||s!==+s||l!==+l||c!==+c||0===l||0===c)return null;var v=ge("recharts-rectangle",d);return g?f.createElement(eU,{canBegin:o>0,from:{width:l,height:c,x:a,y:s},to:{width:l,height:c,x:a,y:s},duration:h,animationEasing:p,isActive:g},(function(e){var r=e.width,i=e.height,a=e.x,s=e.y;return f.createElement(eU,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,isActive:y,easing:p},f.createElement("path",nU({},Aj(t,!0),{className:v,d:sU(a,s,r,i,u),ref:n})))})):f.createElement("path",nU({},Aj(t,!0),{className:v,d:sU(a,s,l,c,u)}))},fU=["points","className","baseLinePoints","connectNulls"];function dU(){return dU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dU.apply(this,arguments)}function pU(e){return function(e){if(Array.isArray(e))return hU(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hU(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hU(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var mU=function(e){return e&&e.x===+e.x&&e.y===+e.y},yU=function(e,t){var n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[[]];return e.forEach((function(e){mU(e)?t[t.length-1].push(e):t[t.length-1].length>0&&t.push([])})),mU(e[0])&&t[t.length-1].push(e[0]),t[t.length-1].length<=0&&(t=t.slice(0,-1)),t}(e);t&&(n=[n.reduce((function(e,t){return[].concat(pU(e),pU(t))}),[])]);var r=n.map((function(e){return e.reduce((function(e,t,n){return"".concat(e).concat(0===n?"M":"L").concat(t.x,",").concat(t.y)}),"")})).join("");return 1===n.length?"".concat(r,"Z"):r},gU=function(e){var t=e.points,n=e.className,r=e.baseLinePoints,o=e.connectNulls,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,fU);if(!t||!t.length)return null;var a=ge("recharts-polygon",n);if(r&&r.length){var s=i.stroke&&"none"!==i.stroke,l=function(e,t,n){var r=yU(e,n);return"".concat("Z"===r.slice(-1)?r.slice(0,-1):r,"L").concat(yU(t.reverse(),n).slice(1))}(t,r,o);return f.createElement("g",{className:a},f.createElement("path",dU({},Aj(i,!0),{fill:"Z"===l.slice(-1)?i.fill:"none",stroke:"none",d:l})),s?f.createElement("path",dU({},Aj(i,!0),{fill:"none",d:yU(t,o)})):null,s?f.createElement("path",dU({},Aj(i,!0),{fill:"none",d:yU(r,o)})):null)}var c=yU(t,o);return f.createElement("path",dU({},Aj(i,!0),{fill:"Z"===c.slice(-1)?i.fill:"none",className:a,d:c}))};function vU(){return vU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vU.apply(this,arguments)}var bU=function(e){var t=e.cx,n=e.cy,r=e.r,o=ge("recharts-dot",e.className);return t===+t&&n===+n&&r===+r?f.createElement("circle",vU({},Aj(e,!1),mj(e),{className:o,cx:t,cy:n,r})):null};function xU(e){return(xU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var wU=["x","y","top","left","width","height","className"];function _U(){return _U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_U.apply(this,arguments)}function SU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function OU(e,t,n){return t=function(e){var t=function(e){if("object"!=xU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xU(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kU=function(e,t,n,r,o,i){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n)},jU=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,i=e.top,a=void 0===i?0:i,s=e.left,l=void 0===s?0:s,c=e.width,u=void 0===c?0:c,d=e.height,p=void 0===d?0:d,h=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SU(Object(n),!0).forEach((function(t){OU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({x:n,y:o,top:a,left:l,width:u,height:p},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,wU));return tj(n)&&tj(o)&&tj(u)&&tj(p)&&tj(a)&&tj(l)?f.createElement("path",_U({},Aj(m,!0),{className:ge("recharts-cross",h),d:kU(n,o,u,p,a,l)})):null},EU=SB,PU=OB,CU=DA,TU=function(e,t){return e&&e.length?EU(e,CU(t),PU):void 0};const AU=m(TU);var MU=SB,NU=DA,DU=TB,IU=function(e,t){return e&&e.length?MU(e,NU(t),DU):void 0};const RU=m(IU);var LU=["cx","cy","angle","ticks","axisLine"],zU=["ticks","tick","angle","tickFormatter","stroke"];function BU(e){return(BU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FU(){return FU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FU.apply(this,arguments)}function WU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function VU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WU(Object(n),!0).forEach((function(t){YU(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $U(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function UU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XU(r.key),r)}}function KU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(KU=function(){return!!e})()}function qU(e){return(qU=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function HU(e,t){return(HU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function YU(e,t,n){return(t=XU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XU(e){var t=function(e){if("object"!=BU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=BU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==BU(t)?t:t+""}var GU=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=qU(t),function(e,t){if(t&&("object"===BU(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,KU()?Reflect.construct(t,n||[],qU(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HU(e,t)}(t,e),function(e,t,n){return t&&UU(e.prototype,t),n&&UU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getTickValueCoord",value:function(e){var t=e.coordinate,n=this.props,r=n.angle,o=n.cx,i=n.cy;return UW(o,i,t,r)}},{key:"getTickTextAnchor",value:function(){var e;switch(this.props.orientation){case"left":e="end";break;case"right":e="start";break;default:e="middle"}return e}},{key:"getViewBox",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=AU(o,(function(e){return e.coordinate||0}));return{cx:t,cy:n,startAngle:r,endAngle:r,innerRadius:RU(o,(function(e){return e.coordinate||0})).coordinate||0,outerRadius:i.coordinate||0}}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.angle,o=e.ticks,i=e.axisLine,a=$U(e,LU),s=o.reduce((function(e,t){return[Math.min(e[0],t.coordinate),Math.max(e[1],t.coordinate)]}),[1/0,-1/0]),l=UW(t,n,s[0],r),c=UW(t,n,s[1],r),u=VU(VU(VU({},Aj(a,!1)),{},{fill:"none"},Aj(i,!1)),{},{x1:l.x,y1:l.y,x2:c.x,y2:c.y});return f.createElement("line",FU({className:"recharts-polar-radius-axis-line"},u))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,o=n.tick,i=n.angle,a=n.tickFormatter,s=n.stroke,l=$U(n,zU),c=this.getTickTextAnchor(),u=Aj(l,!1),d=Aj(o,!1),p=r.map((function(n,r){var l=e.getTickValueCoord(n),p=VU(VU(VU(VU({textAnchor:c,transform:"rotate(".concat(90-i,", ").concat(l.x,", ").concat(l.y,")")},u),{},{stroke:"none",fill:s},d),{},{index:r},l),{},{payload:n});return f.createElement(Wj,FU({className:ge("recharts-polar-radius-axis-tick",YW(o)),key:"tick-".concat(n.coordinate)},yj(e.props,n,r)),t.renderTickItem(o,p,a?a(n.value,r):n.value))}));return f.createElement(Wj,{className:"recharts-polar-radius-axis-ticks"},p)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.axisLine,r=e.tick;return t&&t.length?f.createElement(Wj,{className:ge("recharts-polar-radius-axis",this.props.className)},n&&this.renderAxisLine(),r&&this.renderTicks(),nV.renderCallByParent(this.props,this.getViewBox())):null}}],[{key:"renderTickItem",value:function(e,t,n){return f.isValidElement(e)?f.cloneElement(e,t):GS(e)?e(t):f.createElement(VD,FU({},t,{className:"recharts-polar-radius-axis-tick-value"}),n)}}])}(f.PureComponent);function ZU(e){return(ZU="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function JU(){return JU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JU.apply(this,arguments)}function QU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QU(Object(n),!0).forEach((function(t){iK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QU(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aK(r.key),r)}}function nK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(nK=function(){return!!e})()}function rK(e){return(rK=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function oK(e,t){return(oK=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function iK(e,t,n){return(t=aK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aK(e){var t=function(e){if("object"!=ZU(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ZU(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ZU(t)?t:t+""}YU(GU,"displayName","PolarRadiusAxis"),YU(GU,"axisType","radiusAxis"),YU(GU,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});var sK=Math.PI/180,lK=1e-5,cK=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=rK(t),function(e,t){if(t&&("object"===ZU(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,nK()?Reflect.construct(t,n||[],rK(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&oK(e,t)}(t,e),function(e,t,n){return t&&tK(e.prototype,t),n&&tK(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"getTickLineCoord",value:function(e){var t=this.props,n=t.cx,r=t.cy,o=t.radius,i=t.orientation,a=t.tickSize||8,s=UW(n,r,o,e.coordinate),l=UW(n,r,o+("inner"===i?-1:1)*a,e.coordinate);return{x1:s.x,y1:s.y,x2:l.x,y2:l.y}}},{key:"getTickTextAnchor",value:function(e){var t=this.props.orientation,n=Math.cos(-e.coordinate*sK);return n>lK?"outer"===t?"start":"end":n<-lK?"outer"===t?"end":"start":"middle"}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.cx,n=e.cy,r=e.radius,o=e.axisLine,i=e.axisLineType,a=eK(eK({},Aj(this.props,!1)),{},{fill:"none"},Aj(o,!1));if("circle"===i)return f.createElement(bU,JU({className:"recharts-polar-angle-axis-line"},a,{cx:t,cy:n,r}));var s=this.props.ticks.map((function(e){return UW(t,n,r,e.coordinate)}));return f.createElement(gU,JU({className:"recharts-polar-angle-axis-line"},a,{points:s}))}},{key:"renderTicks",value:function(){var e=this,n=this.props,r=n.ticks,o=n.tick,i=n.tickLine,a=n.tickFormatter,s=n.stroke,l=Aj(this.props,!1),c=Aj(o,!1),u=eK(eK({},l),{},{fill:"none"},Aj(i,!1)),d=r.map((function(n,r){var d=e.getTickLineCoord(n),p=eK(eK(eK({textAnchor:e.getTickTextAnchor(n)},l),{},{stroke:"none",fill:s},c),{},{index:r,payload:n,x:d.x2,y:d.y2});return f.createElement(Wj,JU({className:ge("recharts-polar-angle-axis-tick",YW(o)),key:"tick-".concat(n.coordinate)},yj(e.props,n,r)),i&&f.createElement("line",JU({className:"recharts-polar-angle-axis-tick-line"},u,d)),o&&t.renderTickItem(o,p,a?a(n.value,r):n.value))}));return f.createElement(Wj,{className:"recharts-polar-angle-axis-ticks"},d)}},{key:"render",value:function(){var e=this.props,t=e.ticks,n=e.radius,r=e.axisLine;return n<=0||!t||!t.length?null:f.createElement(Wj,{className:ge("recharts-polar-angle-axis",this.props.className)},r&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(e,t,n){return f.isValidElement(e)?f.cloneElement(e,t):GS(e)?e(t):f.createElement(VD,JU({},t,{className:"recharts-polar-angle-axis-tick-value"}),n)}}])}(f.PureComponent);iK(cK,"displayName","PolarAngleAxis"),iK(cK,"axisType","angleAxis"),iK(cK,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var uK=QC(Object.getPrototypeOf,Object),fK=IS,dK=uK,pK=RS,hK=Function.prototype,mK=Object.prototype,yK=hK.toString,gK=mK.hasOwnProperty,vK=yK.call(Object),bK=function(e){if(!pK(e)||"[object Object]"!=fK(e))return!1;var t=dK(e);if(null===t)return!0;var n=gK.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&yK.call(n)==vK};const xK=m(bK);var wK=IS,_K=RS,SK=function(e){return!0===e||!1===e||_K(e)&&"[object Boolean]"==wK(e)};const OK=m(SK);function kK(e){return(kK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jK(){return jK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jK.apply(this,arguments)}function EK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function PK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?PK(Object(n),!0).forEach((function(t){TK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function TK(e,t,n){return t=function(e){var t=function(e){if("object"!=kK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kK(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var AK,MK=function(e,t,n,r,o){var i,a=n-r;return i="M ".concat(e,",").concat(t),i+="L ".concat(e+n,",").concat(t),i+="L ".concat(e+n-a/2,",").concat(t+o),(i+="L ".concat(e+n-a/2-r,",").concat(t+o))+"L ".concat(e,",").concat(t," Z")},NK={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},DK=function(e){var t=CK(CK({},NK),e),n=(0,f.useRef)(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return EK(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EK(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,f.useState)(-1),2),o=r[0],i=r[1];(0,f.useEffect)((function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&i(e)}catch{}}),[]);var a=t.x,s=t.y,l=t.upperWidth,c=t.lowerWidth,u=t.height,d=t.className,p=t.animationEasing,h=t.animationDuration,m=t.animationBegin,y=t.isUpdateAnimationActive;if(a!==+a||s!==+s||l!==+l||c!==+c||u!==+u||0===l&&0===c||0===u)return null;var g=ge("recharts-trapezoid",d);return y?f.createElement(eU,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:u,x:a,y:s},to:{upperWidth:l,lowerWidth:c,height:u,x:a,y:s},duration:h,animationEasing:p,isActive:y},(function(e){var r=e.upperWidth,i=e.lowerWidth,a=e.height,s=e.x,l=e.y;return f.createElement(eU,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:h,easing:p},f.createElement("path",jK({},Aj(t,!0),{className:g,d:MK(s,l,r,i,a),ref:n})))})):f.createElement("g",null,f.createElement("path",jK({},Aj(t,!0),{className:g,d:MK(a,s,l,c,u)})))},IK=["option","shapeType","propTransformer","activeClassName","isActive"];function RK(e){return(RK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LK(Object(n),!0).forEach((function(t){BK(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function BK(e,t,n){return t=function(e){var t=function(e){if("object"!=RK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=RK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==RK(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FK(e,t){return zK(zK({},t),e)}function WK(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return f.createElement(uU,n);case"trapezoid":return f.createElement(DK,n);case"sector":return f.createElement(kV,n);case"symbols":if(function(e){return"symbols"===e}(t))return f.createElement(OP,n);break;default:return null}}function VK(e){var t,n=e.option,r=e.shapeType,o=e.propTransformer,i=void 0===o?FK:o,a=e.activeClassName,s=void 0===a?"recharts-active-shape":a,l=e.isActive,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,IK);if((0,f.isValidElement)(n))t=(0,f.cloneElement)(n,zK(zK({},c),function(e){return(0,f.isValidElement)(e)?e.props:e}(n)));else if(GS(n))t=n(c);else if(xK(n)&&!OK(n)){var u=i(n,c);t=f.createElement(WK,{shapeType:r,elementProps:u})}else{var d=c;t=f.createElement(WK,{shapeType:r,elementProps:d})}return l?f.createElement(Wj,{className:s},t):t}function $K(e,t){return null!=t&&"trapezoids"in e.props}function UK(e,t){return null!=t&&"sectors"in e.props}function KK(e,t){return null!=t&&"points"in e.props}function qK(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,i=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&i}function HK(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function YK(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function XK(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return $K(e,t)?n="trapezoids":UK(e,t)?n="sectors":KK(e,t)&&(n="points"),n}(n,t),i=function(e,t){var n,r;return $K(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:UK(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:KK(e,t)?t.payload:{}}(n,t),a=r.filter((function(e,r){var a=qB(i,e),s=n.props[o].filter((function(e){var r=function(e,t){var n;return $K(e,t)?n=qK:UK(e,t)?n=HK:KK(e,t)&&(n=YK),n}(n,t);return r(e,t)})),l=n.props[o].indexOf(s[s.length-1]);return a&&r===l}));return r.indexOf(a[a.length-1])}function GK(e){return(GK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ZK(){return ZK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZK.apply(this,arguments)}function JK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function QK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?JK(Object(n),!0).forEach((function(t){oq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JK(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function eq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iq(r.key),r)}}function tq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tq=function(){return!!e})()}function nq(e){return(nq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rq(e,t){return(rq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oq(e,t,n){return(t=iq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iq(e){var t=function(e){if("object"!=GK(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=GK(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==GK(t)?t:t+""}var aq=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),oq(n=function(e,t,n){return t=nq(t),function(e,t){if(t&&("object"===GK(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tq()?Reflect.construct(t,n||[],nq(e).constructor):t.apply(e,n))}(this,t,[e]),"pieRef",null),oq(n,"sectorRefs",[]),oq(n,"id",oj("recharts-pie-")),oq(n,"handleAnimationEnd",(function(){var e=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),GS(e)&&e()})),oq(n,"handleAnimationStart",(function(){var e=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),GS(e)&&e()})),n.state={isAnimationFinished:!e.isAnimationActive,prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,sectorToFocus:0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rq(e,t)}(t,e),function(e,t,n){return t&&eq(e.prototype,t),n&&eq(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"isActiveIndex",value:function(e){var t=this.props.activeIndex;return Array.isArray(t)?-1!==t.indexOf(e):e===t}},{key:"hasActiveIndex",value:function(){var e=this.props.activeIndex;return Array.isArray(e)?0!==e.length:e||0===e}},{key:"renderLabels",value:function(e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.label,o=n.labelLine,i=n.dataKey,a=n.valueKey,s=Aj(this.props,!1),l=Aj(r,!1),c=Aj(o,!1),u=r&&r.offsetRadius||20,d=e.map((function(e,n){var d=(e.startAngle+e.endAngle)/2,p=UW(e.cx,e.cy,e.outerRadius+u,d),h=QK(QK(QK(QK({},s),e),{},{stroke:"none"},l),{},{index:n,textAnchor:t.getTextAnchor(p.x,e.cx)},p),m=QK(QK(QK(QK({},s),e),{},{fill:"none",stroke:e.fill},c),{},{index:n,points:[UW(e.cx,e.cy,e.outerRadius,d),p]}),y=i;return Rk(i)&&Rk(a)?y="value":Rk(i)&&(y=a),f.createElement(Wj,{key:"label-".concat(e.startAngle,"-").concat(e.endAngle,"-").concat(e.midAngle,"-").concat(n)},o&&t.renderLabelLineItem(o,m,"line"),t.renderLabelItem(r,h,pW(e,y)))}));return f.createElement(Wj,{className:"recharts-pie-labels"},d)}},{key:"renderSectorsStatically",value:function(e){var t=this,n=this.props,r=n.activeShape,o=n.blendStroke,i=n.inactiveShape;return e.map((function(n,a){if(0===(null==n?void 0:n.startAngle)&&0===(null==n?void 0:n.endAngle)&&1!==e.length)return null;var s=t.isActiveIndex(a),l=i&&t.hasActiveIndex()?i:null,c=s?r:l,u=QK(QK({},n),{},{stroke:o?n.fill:n.stroke,tabIndex:-1});return f.createElement(Wj,ZK({ref:function(e){e&&!t.sectorRefs.includes(e)&&t.sectorRefs.push(e)},tabIndex:-1,className:"recharts-pie-sector"},yj(t.props,n,a),{key:"sector-".concat(null==n?void 0:n.startAngle,"-").concat(null==n?void 0:n.endAngle,"-").concat(n.midAngle,"-").concat(a)}),f.createElement(VK,ZK({option:c,isActive:s,shapeType:"sector"},u)))}))}},{key:"renderSectorsWithAnimation",value:function(){var e=this,t=this.props,n=t.sectors,r=t.isAnimationActive,o=t.animationBegin,i=t.animationDuration,a=t.animationEasing,s=t.animationId,l=this.state,c=l.prevSectors,u=l.prevIsAnimationActive;return f.createElement(eU,{begin:o,duration:i,isActive:r,easing:a,from:{t:0},to:{t:1},key:"pie-".concat(s,"-").concat(u),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},(function(t){var r=t.t,o=[],i=(n&&n[0]).startAngle;return n.forEach((function(e,t){var n=c&&c[t],a=t>0?Dk(e,"paddingAngle",0):0;if(n){var s=sj(n.endAngle-n.startAngle,e.endAngle-e.startAngle),l=QK(QK({},e),{},{startAngle:i+a,endAngle:i+s(r)+a});o.push(l),i=l.endAngle}else{var u=e.endAngle,f=e.startAngle,d=sj(0,u-f)(r),p=QK(QK({},e),{},{startAngle:i+a,endAngle:i+d+a});o.push(p),i=p.endAngle}})),f.createElement(Wj,null,e.renderSectorsStatically(o))}))}},{key:"attachKeyboardHandlers",value:function(e){var t=this;e.onkeydown=function(e){if(!e.altKey)switch(e.key){case"ArrowLeft":var n=++t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[n].focus(),t.setState({sectorToFocus:n});break;case"ArrowRight":var r=--t.state.sectorToFocus<0?t.sectorRefs.length-1:t.state.sectorToFocus%t.sectorRefs.length;t.sectorRefs[r].focus(),t.setState({sectorToFocus:r});break;case"Escape":t.sectorRefs[t.state.sectorToFocus].blur(),t.setState({sectorToFocus:0})}}}},{key:"renderSectors",value:function(){var e=this.props,t=e.sectors,n=e.isAnimationActive,r=this.state.prevSectors;return!(n&&t&&t.length)||r&&qB(r,t)?this.renderSectorsStatically(t):this.renderSectorsWithAnimation()}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var e=this,t=this.props,n=t.hide,r=t.sectors,o=t.className,i=t.label,a=t.cx,s=t.cy,l=t.innerRadius,c=t.outerRadius,u=t.isAnimationActive,d=this.state.isAnimationFinished;if(n||!r||!r.length||!tj(a)||!tj(s)||!tj(l)||!tj(c))return null;var p=ge("recharts-pie",o);return f.createElement(Wj,{tabIndex:this.props.rootTabIndex,className:p,ref:function(t){e.pieRef=t}},this.renderSectors(),i&&this.renderLabels(r),nV.renderCallByParent(this.props,null,!1),(!u||d)&&yV.renderCallByParent(this.props,r,!1))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return t.prevIsAnimationActive!==e.isAnimationActive?{prevIsAnimationActive:e.isAnimationActive,prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:[],isAnimationFinished:!0}:e.isAnimationActive&&e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curSectors:e.sectors,prevSectors:t.curSectors,isAnimationFinished:!0}:e.sectors!==t.curSectors?{curSectors:e.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(e,t){return e>t?"start":e<t?"end":"middle"}},{key:"renderLabelLineItem",value:function(e,t,n){if(f.isValidElement(e))return f.cloneElement(e,t);if(GS(e))return e(t);var r=ge("recharts-pie-label-line","boolean"!=typeof e?e.className:"");return f.createElement(BV,ZK({},t,{key:n,type:"linear",className:r}))}},{key:"renderLabelItem",value:function(e,t,n){if(f.isValidElement(e))return f.cloneElement(e,t);var r=n;if(GS(e)&&(r=e(t),f.isValidElement(r)))return r;var o=ge("recharts-pie-label-text","boolean"==typeof e||GS(e)?"":e.className);return f.createElement(VD,ZK({},t,{alignmentBaseline:"middle",className:o}),r)}}])}(f.PureComponent);AK=aq,oq(aq,"displayName","Pie"),oq(aq,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!CN.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0}),oq(aq,"parseDeltaAngle",(function(e,t){return Qk(t-e)*Math.min(Math.abs(t-e),360)})),oq(aq,"getRealPieData",(function(e){var t=e.data,n=e.children,r=Aj(e,!1),o=jj(n,sD);return t&&t.length?t.map((function(e,t){return QK(QK(QK({payload:e},r),e),o&&o[t]&&o[t].props)})):o&&o.length?o.map((function(e){return QK(QK({},r),e.props)})):[]})),oq(aq,"parseCoordinateOfPie",(function(e,t){var n=t.top,r=t.left,o=t.width,i=t.height,a=KW(o,i);return{cx:r+ij(e.cx,o,o/2),cy:n+ij(e.cy,i,i/2),innerRadius:ij(e.innerRadius,a,0),outerRadius:ij(e.outerRadius,a,.8*a),maxRadius:e.maxRadius||Math.sqrt(o*o+i*i)/2}})),oq(aq,"getComposedData",(function(e){var t=e.item,n=e.offset,r=void 0!==t.type.defaultProps?QK(QK({},t.type.defaultProps),t.props):t.props,o=AK.getRealPieData(r);if(!o||!o.length)return null;var i=r.cornerRadius,a=r.startAngle,s=r.endAngle,l=r.paddingAngle,c=r.dataKey,u=r.nameKey,f=r.valueKey,d=r.tooltipType,p=Math.abs(r.minAngle),h=AK.parseCoordinateOfPie(r,n),m=AK.parseDeltaAngle(a,s),y=Math.abs(m),g=c;Rk(c)&&Rk(f)?(Vj(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),g="value"):Rk(c)&&(Vj(!1,'Use "dataKey" to specify the value of pie,\n the props "valueKey" will be deprecated in 1.1.0'),g=f);var v,b,x=o.filter((function(e){return 0!==pW(e,g,0)})).length,w=y-x*p-(y>=360?x:x-1)*l,_=o.reduce((function(e,t){var n=pW(t,g,0);return e+(tj(n)?n:0)}),0);return _>0&&(v=o.map((function(e,t){var n,r=pW(e,g,0),o=pW(e,u,t),s=(tj(r)?r:0)/_,c=(n=t?b.endAngle+Qk(m)*l*(0!==r?1:0):a)+Qk(m)*((0!==r?p:0)+s*w),f=(n+c)/2,y=(h.innerRadius+h.outerRadius)/2,v=[{name:o,value:r,payload:e,dataKey:g,type:d}],x=UW(h.cx,h.cy,y,f);return b=QK(QK(QK({percent:s,cornerRadius:i,name:o,tooltipPayload:v,midAngle:f,middleRadius:y,tooltipPosition:x},e),h),{},{value:pW(e,g),startAngle:n,endAngle:c,payload:e,paddingAngle:Qk(m)*l})}))),QK(QK({},h),{},{sectors:v,data:o})}));var sq=Math.ceil,lq=Math.max,cq=ZN,uq=1/0,fq=function(e){return e?(e=cq(e))===uq||e===-uq?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0},dq=function(e,t,n,r){for(var o=-1,i=lq(sq((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a},pq=eN,hq=fq;const mq=m(function(e){return function(t,n,r){return r&&"number"!=typeof r&&pq(t,n,r)&&(n=r=void 0),t=hq(t),void 0===n?(n=t,t=0):n=hq(n),r=void 0===r?t<n?1:-1:hq(r),dq(t,n,r,e)}}());function yq(e){return(yq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gq(Object(n),!0).forEach((function(t){bq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function bq(e,t,n){return t=function(e){var t=function(e){if("object"!=yq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=yq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==yq(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xq=["Webkit","Moz","O","ms"];function wq(e){return(wq="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _q(){return _q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_q.apply(this,arguments)}function Sq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sq(Object(n),!0).forEach((function(t){Cq(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sq(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function kq(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tq(r.key),r)}}function jq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jq=function(){return!!e})()}function Eq(e){return(Eq=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Pq(e,t){return(Pq=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Cq(e,t,n){return(t=Tq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tq(e){var t=function(e){if("object"!=wq(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wq(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wq(t)?t:t+""}var Aq=function(e){return e.changedTouches&&!!e.changedTouches.length},Mq=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Cq(n=function(e,t,n){return t=Eq(t),function(e,t){if(t&&("object"===wq(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jq()?Reflect.construct(t,n||[],Eq(e).constructor):t.apply(e,n))}(this,t,[e]),"handleDrag",(function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)})),Cq(n,"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])})),Cq(n,"handleDragEnd",(function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},(function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:t,startIndex:o})})),n.detachDragEndListener()})),Cq(n,"handleLeaveWrapper",(function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))})),Cq(n,"handleEnterSlideOrTraveller",(function(){n.setState({isTextActive:!0})})),Cq(n,"handleLeaveSlideOrTraveller",(function(){n.setState({isTextActive:!1})})),Cq(n,"handleSlideDragStart",(function(e){var t=Aq(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()})),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pq(e,t)}(t,e),function(e,t,n){return t&&kq(e.prototype,t),n&&kq(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var n=e.startX,r=e.endX,o=this.state.scaleValues,i=this.props,a=i.gap,s=i.data.length-1,l=Math.min(n,r),c=Math.max(n,r),u=t.getIndexInRange(o,l),f=t.getIndexInRange(o,c);return{startIndex:u-u%a,endIndex:f===s?s:f-f%a}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,i=pW(n[e],o,e);return GS(r)?r(i,e):i}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,i=this.props,a=i.x,s=i.width,l=i.travellerWidth,c=i.startIndex,u=i.endIndex,f=i.onChange,d=e.pageX-n;d>0?d=Math.min(d,a+s-l-o,a+s-l-r):d<0&&(d=Math.max(d,a-r,a-o));var p=this.getIndex({startX:r+d,endX:o+d});(p.startIndex!==c||p.endIndex!==u)&&f&&f(p),this.setState({startX:r+d,endX:o+d,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=Aq(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,i=t.startX,a=this.state[r],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,f=s.onChange,d=s.gap,p=s.data,h={startX:this.state.startX,endX:this.state.endX},m=e.pageX-n;m>0?m=Math.min(m,l+c-u-a):m<0&&(m=Math.max(m,l-a)),h[r]=a+m;var y=this.getIndex(h),g=y.startIndex,v=y.endIndex;this.setState(Cq(Cq({},r,a+m),"brushMoveStartX",e.pageX),(function(){var e;f&&(e=p.length-1,"startX"===r&&(o>i?g%d==0:v%d==0)||o<i&&v===e||"endX"===r&&(o>i?v%d==0:g%d==0)||o>i&&v===e)&&f(y)}))}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,i=r.startX,a=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];"startX"===t&&u>=a||"endX"===t&&u<=i||this.setState(Cq({},t,u),(function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))}))}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,i=e.fill,a=e.stroke;return f.createElement("rect",{stroke:a,fill:i,x:t,y:n,width:r,height:o})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,i=e.data,a=e.children,s=e.padding,l=f.Children.only(a);return l?f.cloneElement(l,{x:t,y:n,width:r,height:o,margin:s,compact:!0,data:i}):null}},{key:"renderTravellerLayer",value:function(e,n){var r,o,i=this,a=this.props,s=a.y,l=a.travellerWidth,c=a.height,u=a.traveller,d=a.ariaLabel,p=a.data,h=a.startIndex,m=a.endIndex,y=Math.max(e,this.props.x),g=Oq(Oq({},Aj(this.props,!1)),{},{x:y,y:s,width:l,height:c}),v=d||"Min value: ".concat(null===(r=p[h])||void 0===r?void 0:r.name,", Max value: ").concat(null===(o=p[m])||void 0===o?void 0:o.name);return f.createElement(Wj,{tabIndex:0,role:"slider","aria-label":v,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),i.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,n))},onFocus:function(){i.setState({isTravellerFocused:!0})},onBlur:function(){i.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(u,g))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,o=n.height,i=n.stroke,a=n.travellerWidth,s=Math.min(e,t)+a,l=Math.max(Math.abs(t-e)-a,0);return f.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:i,fillOpacity:.2,x:s,y:r,width:l,height:o})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,o=e.height,i=e.travellerWidth,a=e.stroke,s=this.state,l=s.startX,c=s.endX,u={pointerEvents:"none",fill:a};return f.createElement(Wj,{className:"recharts-brush-texts"},f.createElement(VD,_q({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,c)-5,y:r+o/2},u),this.getTextOfTick(t)),f.createElement(VD,_q({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,c)+i+5,y:r+o/2},u),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,o=e.x,i=e.y,a=e.width,s=e.height,l=e.alwaysShowText,c=this.state,u=c.startX,d=c.endX,p=c.isTextActive,h=c.isSlideMoving,m=c.isTravellerMoving,y=c.isTravellerFocused;if(!t||!t.length||!tj(o)||!tj(i)||!tj(a)||!tj(s)||a<=0||s<=0)return null;var g=ge("recharts-brush",n),v=1===f.Children.count(r),b=function(e,t){var n=e.replace(/(\w)/,(function(e){return e.toUpperCase()})),r=xq.reduce((function(e,r){return vq(vq({},e),{},bq({},r+n,t))}),{});return r[e]=t,r}("userSelect","none");return f.createElement(Wj,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:b},this.renderBackground(),v&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(d,"endX"),(p||h||m||y||l)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height,i=e.stroke,a=Math.floor(n+o/2)-1;return f.createElement(f.Fragment,null,f.createElement("rect",{x:t,y:n,width:r,height:o,fill:i,stroke:"none"}),f.createElement("line",{x1:t+1,y1:a,x2:t+r-1,y2:a,fill:"none",stroke:"#fff"}),f.createElement("line",{x1:t+1,y1:a+2,x2:t+r-1,y2:a+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return f.isValidElement(e)?f.cloneElement(e,n):GS(e)?e(n):t.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,i=e.travellerWidth,a=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||a!==t.prevUpdateId)return Oq({prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,i=e.width,a=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=gI().domain(mq(0,s)).range([o,o+i-a]),c=l.domain().map((function(e){return l(e)}));return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:o,travellerWidth:i,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||i!==t.prevTravellerWidth)){t.scale.range([o,o+r-i]);var c=t.scale.domain().map((function(e){return t.scale(e)}));return{prevData:n,prevTravellerWidth:i,prevUpdateId:a,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}])}(f.PureComponent);Cq(Mq,"displayName","Brush"),Cq(Mq,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Nq=wM,Dq=ZP,Iq=DA,Rq=function(e,t){var n;return Nq(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n},Lq=xS,zq=eN,Bq=function(e,t,n){var r=Lq(e)?Dq:Rq;return n&&zq(e,t,n)&&(t=void 0),r(e,Iq(t))};const Fq=m(Bq);var Wq=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},Vq=FM,$q=function(e,t,n){"__proto__"==t&&Vq?Vq(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Uq=bM,Kq=DA,qq=function(e,t){var n={};return t=Kq(t),Uq(e,(function(e,r,o){$q(n,r,t(e,r,o))})),n};const Hq=m(qq);var Yq=wM,Xq=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0},Gq=function(e,t){var n=!0;return Yq(e,(function(e,r,o){return n=!!t(e,r,o)})),n},Zq=DA,Jq=xS,Qq=eN,eH=function(e,t,n){var r=Jq(e)?Xq:Gq;return n&&Qq(e,t,n)&&(t=void 0),r(e,Zq(t))};const tH=m(eH);var nH=["x","y"];function rH(e){return(rH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oH(){return oH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oH.apply(this,arguments)}function iH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iH(Object(n),!0).forEach((function(t){sH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sH(e,t,n){return t=function(e){var t=function(e){if("object"!=rH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=rH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==rH(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lH(e,t){var n=e.x,r=e.y,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,nH),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),f="".concat(t.width||o.width),d=parseInt(f,10);return aH(aH(aH(aH(aH({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:d,name:t.name,radius:t.radius})}function cH(e){return f.createElement(VK,oH({shapeType:"rectangle",propTransformer:lH,activeClassName:"recharts-active-bar"},e))}var uH,fH=["value","background"];function dH(e){return(dH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pH(){return pH=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pH.apply(this,arguments)}function hH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hH(Object(n),!0).forEach((function(t){xH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wH(r.key),r)}}function gH(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(gH=function(){return!!e})()}function vH(e){return(vH=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bH(e,t){return(bH=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xH(e,t,n){return(t=wH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wH(e){var t=function(e){if("object"!=dH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dH(t)?t:t+""}var _H=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return xH(e=function(e,t,n){return t=vH(t),function(e,t){if(t&&("object"===dH(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,gH()?Reflect.construct(t,n||[],vH(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!1}),xH(e,"id",oj("recharts-bar-")),xH(e,"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()})),xH(e,"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bH(e,t)}(t,e),function(e,t,n){return t&&yH(e.prototype,t),n&&yH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props,r=n.shape,o=n.dataKey,i=n.activeIndex,a=n.activeBar,s=Aj(this.props,!1);return e&&e.map((function(e,n){var l=n===i,c=l?a:r,u=mH(mH(mH({},s),e),{},{isActive:l,option:c,index:n,dataKey:o,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return f.createElement(Wj,pH({className:"recharts-bar-rectangle"},yj(t.props,e,n),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value)}),f.createElement(cH,u))}))}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.layout,o=t.isAnimationActive,i=t.animationBegin,a=t.animationDuration,s=t.animationEasing,l=t.animationId,c=this.state.prevData;return f.createElement(eU,{begin:i,duration:a,isActive:o,easing:s,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(t){var o=t.t,i=n.map((function(e,t){var n=c&&c[t];if(n){var i=sj(n.x,e.x),a=sj(n.y,e.y),s=sj(n.width,e.width),l=sj(n.height,e.height);return mH(mH({},e),{},{x:i(o),y:a(o),width:s(o),height:l(o)})}if("horizontal"===r){var u=sj(0,e.height)(o);return mH(mH({},e),{},{y:e.y+e.height-u,height:u})}var f=sj(0,e.width)(o);return mH(mH({},e),{},{width:f})}));return f.createElement(Wj,null,e.renderRectanglesStatically(i))}))}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&qB(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,o=t.activeIndex,i=Aj(this.props.background,!1);return n.map((function(t,n){t.value;var a=t.background,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,fH);if(!a)return null;var l=mH(mH(mH(mH(mH({},s),{},{fill:"#eee"},a),i),yj(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:"recharts-bar-background-rectangle"});return f.createElement(cH,pH({key:"background-bar-".concat(n),option:e.props.background,isActive:n===o},l))}))}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,o=n.xAxis,i=n.yAxis,a=n.layout,s=jj(n.children,tW);if(!s)return null;var l="vertical"===a?r[0].height/2:r[0].width/2,c=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:pW(e,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return f.createElement(Wj,u,s.map((function(e){return f.cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:r,xAxis:o,yAxis:i,layout:a,offset:l,dataPointFormatter:c})})))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,o=e.xAxis,i=e.yAxis,a=e.left,s=e.top,l=e.width,c=e.height,u=e.isAnimationActive,d=e.background,p=e.id;if(t||!n||!n.length)return null;var h=this.state.isAnimationFinished,m=ge("recharts-bar",r),y=o&&o.allowDataOverflow,g=i&&i.allowDataOverflow,v=y||g,b=Rk(p)?this.id:p;return f.createElement(Wj,{className:m},y||g?f.createElement("defs",null,f.createElement("clipPath",{id:"clipPath-".concat(b)},f.createElement("rect",{x:y?a:a-l/2,y:g?s:s-c/2,width:y?l:2*l,height:g?c:2*c}))):null,f.createElement(Wj,{className:"recharts-bar-rectangles",clipPath:v?"url(#clipPath-".concat(b,")"):null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(v,b),(!u||h)&&yV.renderCallByParent(this.props,n))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}])}(f.PureComponent);function SH(e){return(SH="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PH(r.key),r)}}function kH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kH(Object(n),!0).forEach((function(t){EH(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kH(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EH(e,t,n){return(t=PH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(e){var t=function(e){if("object"!=SH(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=SH(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==SH(t)?t:t+""}uH=_H,xH(_H,"displayName","Bar"),xH(_H,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!CN.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),xH(_H,"getComposedData",(function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,i=e.xAxis,a=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,d=e.offset,p=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!p)return null;var h=t.layout,m=n.type.defaultProps,y=void 0!==m?mH(mH({},m),n.props):n.props,g=y.dataKey,v=y.children,b=y.minPointSize,x="horizontal"===h?a:i,w=c?x.scale.domain():null,_=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:x}),S=jj(v,sD),O=f.map((function(e,t){var r,f,d,m,y,v;c?r=function(e,t){if(!t||2!==t.length||!tj(t[0])||!tj(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!tj(e[0])||e[0]<n)&&(o[0]=n),(!tj(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(c[u+t],w):(r=pW(e,g),Array.isArray(r)||(r=[_,r]));var x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o="number"==typeof n;return o?e(n,r):(o||KF(),t)}}(b,uH.defaultProps.minPointSize)(r[1],t);if("horizontal"===h){var O,k=[a.scale(r[0]),a.scale(r[1])],j=k[0],E=k[1];f=CW({axis:i,ticks:s,bandSize:o,offset:p.offset,entry:e,index:t}),d=null!==(O=E??j)&&void 0!==O?O:void 0,m=p.size;var P=j-E;if(y=Number.isNaN(P)?0:P,v={x:f,y:a.y,width:m,height:a.height},Math.abs(x)>0&&Math.abs(y)<Math.abs(x)){var C=Qk(y||x)*(Math.abs(x)-Math.abs(y));d-=C,y+=C}}else{var T=[i.scale(r[0]),i.scale(r[1])],A=T[0],M=T[1];f=A,d=CW({axis:a,ticks:l,bandSize:o,offset:p.offset,entry:e,index:t}),m=M-A,y=p.size,v={x:i.x,y:d,width:i.width,height:y},Math.abs(x)>0&&Math.abs(m)<Math.abs(x)&&(m+=Qk(m||x)*(Math.abs(x)-Math.abs(m)))}return mH(mH(mH({},e),{},{x:f,y:d,width:m,height:y,value:c?r:r[1],payload:e,background:v},S&&S[t]&&S[t].props),{},{tooltipPayload:[RW(n,e)],tooltipPosition:{x:f+m/2,y:d+y/2}})}));return mH({data:O,layout:h},d)}));var CH=function(e,t,n,r,o){var i=e.width,a=e.height,s=e.layout,l=e.children,c=Object.keys(t),u={left:n.left,leftMirror:n.left,right:i-n.right,rightMirror:i-n.right,top:n.top,topMirror:n.top,bottom:a-n.bottom,bottomMirror:a-n.bottom},f=!!Ej(l,_H);return c.reduce((function(i,a){var l,c,d,p,h,m=t[a],y=m.orientation,g=m.domain,v=m.padding,b=void 0===v?{}:v,x=m.mirror,w=m.reversed,_="".concat(y).concat(x?"Mirror":"");if("number"===m.type&&("gap"===m.padding||"no-gap"===m.padding)){var S=g[1]-g[0],O=1/0,k=m.categoricalDomain.sort();if(k.forEach((function(e,t){t>0&&(O=Math.min((e||0)-(k[t-1]||0),O))})),Number.isFinite(O)){var j=O/S,E="vertical"===m.layout?n.height:n.width;if("gap"===m.padding&&(l=j*E/2),"no-gap"===m.padding){var P=ij(e.barCategoryGap,j*E),C=j*E/2;l=C-P-(C-P)/E*P}}}c="xAxis"===r?[n.left+(b.left||0)+(l||0),n.left+n.width-(b.right||0)-(l||0)]:"yAxis"===r?"horizontal"===s?[n.top+n.height-(b.bottom||0),n.top+(b.top||0)]:[n.top+(b.top||0)+(l||0),n.top+n.height-(b.bottom||0)-(l||0)]:m.range,w&&(c=[c[1],c[0]]);var T=_W(m,o,f),A=T.scale,M=T.realScaleType;A.domain(g).range(c),OW(A);var N=EW(A,jH(jH({},m),{},{realScaleType:M}));"xAxis"===r?(h="top"===y&&!x||"bottom"===y&&x,d=n.left,p=u[_]-h*m.height):"yAxis"===r&&(h="left"===y&&!x||"right"===y&&x,d=u[_]-h*m.width,p=n.top);var D=jH(jH(jH({},m),N),{},{realScaleType:M,x:d,y:p,scale:A,width:"xAxis"===r?n.width:m.width,height:"yAxis"===r?n.height:m.height});return D.bandSize=DW(D,N),m.hide||"xAxis"!==r?m.hide||(u[_]+=(h?-1:1)*D.width):u[_]+=(h?-1:1)*D.height,jH(jH({},i),{},EH({},a,D))}),{})},TH=function(e,t){var n=e.x,r=e.y,o=t.x,i=t.y;return{x:Math.min(n,o),y:Math.min(r,i),width:Math.abs(o-n),height:Math.abs(i-r)}},AH=function(){function e(t){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.scale=t}return function(e,t,n){return t&&OH(e.prototype,t),n&&OH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var i=this.bandwidth?this.bandwidth():0;return this.scale(e)+i}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+a}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],[{key:"create",value:function(t){return new e(t)}}])}();EH(AH,"EPS",1e-4);var MH=function(e){var t=Object.keys(e).reduce((function(t,n){return jH(jH({},t),{},EH({},n,AH.create(e[n])))}),{});return jH(jH({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return Hq(e,(function(e,n){return t[n].apply(e,{bandAware:r,position:o})}))},isInRange:function(e){return tH(e,(function(e,n){return t[n].isInRange(e)}))}})},NH=DA,DH=aT,IH=uT,RH=fq,LH=IA,zH=DA,BH=function(e){var t=RH(e),n=t%1;return t==t?n?t-n:t:0},FH=Math.max;var WH=lk((function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}}),(function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")})),VH=(0,f.createContext)(void 0),$H=(0,f.createContext)(void 0),UH=(0,f.createContext)(void 0),KH=(0,f.createContext)({}),qH=(0,f.createContext)(void 0),HH=(0,f.createContext)(0),YH=(0,f.createContext)(0),XH=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,o=t.offset,i=e.clipPathId,a=e.children,s=e.width,l=e.height,c=WH(o);return f.createElement(VH.Provider,{value:n},f.createElement($H.Provider,{value:r},f.createElement(KH.Provider,{value:o},f.createElement(UH.Provider,{value:c},f.createElement(qH.Provider,{value:i},f.createElement(HH.Provider,{value:l},f.createElement(YH.Provider,{value:s},a)))))))},GH=function(e){var t=(0,f.useContext)(VH);null==t&&KF();var n=t[e];return null==n&&KF(),n},ZH=function(e){var t=(0,f.useContext)($H);null==t&&KF();var n=t[e];return null==n&&KF(),n},JH=function(){return(0,f.useContext)(YH)},QH=function(){return(0,f.useContext)(HH)};function eY(e){return(eY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tY=function(){return!!e})()}function nY(e){return(nY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function rY(e,t){return(rY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function iY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oY(Object(n),!0).forEach((function(t){aY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function aY(e,t,n){return(t=sY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sY(e){var t=function(e){if("object"!=eY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eY(t)?t:t+""}function lY(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cY(){return cY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cY.apply(this,arguments)}function uY(e){var t=e.x,n=e.y,r=e.segment,o=e.xAxisId,i=e.yAxisId,a=e.shape,s=e.className,l=e.alwaysShow,c=(0,f.useContext)(qH),u=GH(o),d=ZH(i),p=(0,f.useContext)(UH);if(!c||!p)return null;Vj(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=function(e,t,n,r,o,i,a,s,l){var c=o.x,u=o.y,f=o.width,d=o.height;if(n){var p=l.y,h=e.y.apply(p,{position:i});if(Wq(l,"discard")&&!e.y.isInRange(h))return null;var m=[{x:c+f,y:h},{x:c,y:h}];return"left"===s?m.reverse():m}if(t){var y=l.x,g=e.x.apply(y,{position:i});if(Wq(l,"discard")&&!e.x.isInRange(g))return null;var v=[{x:g,y:u+d},{x:g,y:u}];return"top"===a?v.reverse():v}if(r){var b=l.segment.map((function(t){return e.apply(t,{position:i})}));return Wq(l,"discard")&&Fq(b,(function(t){return!e.isInRange(t)}))?null:b}return null}(MH({x:u.scale,y:d.scale}),nj(t),nj(n),r&&2===r.length,p,e.position,u.orientation,d.orientation,e);if(!h)return null;var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return lY(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lY(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h,2),y=m[0],g=y.x,v=y.y,b=m[1],x=b.x,w=b.y,_=iY(iY({clipPath:Wq(e,"hidden")?"url(#".concat(c,")"):void 0},Aj(e,!0)),{},{x1:g,y1:v,x2:x,y2:w});return f.createElement(Wj,{className:ge("recharts-reference-line",s)},function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):GS(e)?e(t):f.createElement("line",cY({},t,{className:"recharts-reference-line-line"}))}(a,_),nV.renderCallByParent(e,function(e){return TH({x:e.x1,y:e.y1},{x:e.x2,y:e.y2})}({x1:g,y1:v,x2:x,y2:w})))}var fY=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=nY(t),function(e,t){if(t&&("object"===eY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tY()?Reflect.construct(t,n||[],nY(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rY(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sY(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return f.createElement(uY,this.props)}}])}(f.Component);function dY(){return dY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dY.apply(this,arguments)}function pY(e){return(pY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hY(Object(n),!0).forEach((function(t){bY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(yY=function(){return!!e})()}function gY(e){return(gY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function vY(e,t){return(vY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bY(e,t,n){return(t=xY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xY(e){var t=function(e){if("object"!=pY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pY(t)?t:t+""}aY(fY,"displayName","ReferenceLine"),aY(fY,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var wY=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=gY(t),function(e,t){if(t&&("object"===pY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yY()?Reflect.construct(t,n||[],gY(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vY(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xY(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,o=e.r,i=e.alwaysShow,a=e.clipPathId,s=nj(n),l=nj(r);if(Vj(void 0===i,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!l)return null;var c=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,i=MH({x:r.scale,y:o.scale}),a=i.apply({x:t,y:n},{bandAware:!0});return Wq(e,"discard")&&!i.isInRange(a)?null:a}(this.props);if(!c)return null;var u=c.x,d=c.y,p=this.props,h=p.shape,m=p.className,y=mY(mY({clipPath:Wq(this.props,"hidden")?"url(#".concat(a,")"):void 0},Aj(this.props,!0)),{},{cx:u,cy:d});return f.createElement(Wj,{className:ge("recharts-reference-dot",m)},t.renderDot(h,y),nV.renderCallByParent(this.props,{x:u-o,y:d-o,width:2*o,height:2*o}))}}])}(f.Component);function _Y(){return _Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_Y.apply(this,arguments)}function SY(e){return(SY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OY(Object(n),!0).forEach((function(t){CY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jY=function(){return!!e})()}function EY(e){return(EY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function PY(e,t){return(PY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function CY(e,t,n){return(t=TY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TY(e){var t=function(e){if("object"!=SY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=SY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==SY(t)?t:t+""}bY(wY,"displayName","ReferenceDot"),bY(wY,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),bY(wY,"renderDot",(function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):GS(e)?e(t):f.createElement(bU,dY({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))}));var AY=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=EY(t),function(e,t){if(t&&("object"===SY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,jY()?Reflect.construct(t,n||[],EY(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PY(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,TY(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){var e=this.props,n=e.x1,r=e.x2,o=e.y1,i=e.y2,a=e.className,s=e.alwaysShow,l=e.clipPathId;Vj(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=nj(n),u=nj(r),d=nj(o),p=nj(i),h=this.props.shape;if(!(c||u||d||p||h))return null;var m=function(e,t,n,r,o){var i=o.x1,a=o.x2,s=o.y1,l=o.y2,c=o.xAxis,u=o.yAxis;if(!c||!u)return null;var f=MH({x:c.scale,y:u.scale}),d={x:e?f.x.apply(i,{position:"start"}):f.x.rangeMin,y:n?f.y.apply(s,{position:"start"}):f.y.rangeMin},p={x:t?f.x.apply(a,{position:"end"}):f.x.rangeMax,y:r?f.y.apply(l,{position:"end"}):f.y.rangeMax};return!Wq(o,"discard")||f.isInRange(d)&&f.isInRange(p)?TH(d,p):null}(c,u,d,p,this.props);if(!m&&!h)return null;var y=Wq(this.props,"hidden")?"url(#".concat(l,")"):void 0;return f.createElement(Wj,{className:ge("recharts-reference-area",a)},t.renderRect(h,kY(kY({clipPath:y},Aj(this.props,!0)),m)),nV.renderCallByParent(this.props,m))}}])}(f.Component);function MY(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t)r.push(e[o]);return r}function NY(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function DY(e){return(DY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function RY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IY(Object(n),!0).forEach((function(t){LY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function LY(e,t,n){return t=function(e){var t=function(e){if("object"!=DY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=DY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==DY(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zY(e,t,n){var r=e.tick,o=e.ticks,i=e.viewBox,a=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,f=e.angle;if(!o||!o.length||!r)return[];if(tj(l)||CN.isSsr)return function(e,t){return MY(e,t+1)}(o,"number"==typeof l&&tj(l)?l:0);var d=[],p="top"===s||"bottom"===s?"width":"height",h=u&&"width"===p?mD(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},m=function(e,r){var o=GS(c)?c(e.value,r):e.value;return"width"===p?function(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}(mD(o,{fontSize:t,letterSpacing:n}),h,f):mD(o,{fontSize:t,letterSpacing:n})[p]},y=o.length>=2?Qk(o[1].coordinate-o[0].coordinate):1,g=function(e,t,n){var r="width"===n,o=e.x,i=e.y,a=e.width,s=e.height;return 1===t?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}(i,y,p);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,f=s,d=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:MY(r,u)};var i,a=c,d=function(){return void 0===i&&(i=n(t,a)),i},p=t.coordinate,h=0===c||NY(e,p,d,f,l);h||(c=0,f=s,u+=1),h&&(f=p+e*(d()/2+o),c+=u)};u<=a.length;)if(i=d())return i.v;return[]}(y,g,m,o,a):(d="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],f=n(u,s-1),d=e*(u.coordinate+e*f/2-c);a[s-1]=u=RY(RY({},u),{},{tickCoord:d>0?u.coordinate-d*e:u.coordinate}),NY(e,u.tickCoord,(function(){return f}),l,c)&&(c=u.tickCoord-e*(f/2+o),a[s-1]=RY(RY({},u),{},{isShow:!0}))}for(var p=i?s-1:s,h=function(t){var r,i=a[t],s=function(){return void 0===r&&(r=n(i,t)),r};if(0===t){var u=e*(i.coordinate-e*s()/2-l);a[t]=i=RY(RY({},i),{},{tickCoord:u<0?i.coordinate-u*e:i.coordinate})}else a[t]=i=RY(RY({},i),{},{tickCoord:i.coordinate});NY(e,i.tickCoord,s,l,c)&&(l=i.tickCoord+e*(s()/2+o),a[t]=RY(RY({},i),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(y,g,m,o,a,"preserveStartEnd"===l):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,s=t.start,l=t.end,c=function(t){var r,c=i[t],u=function(){return void 0===r&&(r=n(c,t)),r};if(t===a-1){var f=e*(c.coordinate+e*u()/2-l);i[t]=c=RY(RY({},c),{},{tickCoord:f>0?c.coordinate-f*e:c.coordinate})}else i[t]=c=RY(RY({},c),{},{tickCoord:c.coordinate});NY(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),i[t]=RY(RY({},c),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}(y,g,m,o,a),d.filter((function(e){return e.isShow})))}CY(AY,"displayName","ReferenceArea"),CY(AY,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),CY(AY,"renderRect",(function(e,t){return f.isValidElement(e)?f.cloneElement(e,t):GS(e)?e(t):f.createElement(uU,_Y({},t,{className:"recharts-reference-area-rect"}))}));var BY=["viewBox"],FY=["viewBox"],WY=["ticks"];function VY(e){return(VY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $Y(){return $Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$Y.apply(this,arguments)}function UY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function KY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UY(Object(n),!0).forEach((function(t){ZY(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UY(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function HY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,JY(r.key),r)}}function YY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(YY=function(){return!!e})()}function XY(e){return(XY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function GY(e,t){return(GY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ZY(e,t,n){return(t=JY(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JY(e){var t=function(e){if("object"!=VY(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=VY(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==VY(t)?t:t+""}var QY=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=XY(t),function(e,t){if(t&&("object"===VY(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,YY()?Reflect.construct(t,n||[],XY(e).constructor):t.apply(e,n))}(this,t,[e])).state={fontSize:"",letterSpacing:""},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GY(e,t)}(t,e),function(e,t,n){return t&&HY(e.prototype,t),n&&HY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=qY(e,BY),o=this.props,i=o.viewBox,a=qY(o,FY);return!cj(n,i)||!cj(r,a)||!cj(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,i,a,s=this.props,l=s.x,c=s.y,u=s.width,f=s.height,d=s.orientation,p=s.tickSize,h=s.mirror,m=s.tickMargin,y=h?-1:1,g=e.tickSize||p,v=tj(e.tickCoord)?e.tickCoord:e.coordinate;switch(d){case"top":t=n=e.coordinate,a=(r=(o=c+ +!h*f)-y*g)-y*m,i=v;break;case"left":r=o=e.coordinate,i=(t=(n=l+ +!h*u)-y*g)-y*m,a=v;break;case"right":r=o=e.coordinate,i=(t=(n=l+ +h*u)+y*g)+y*m,a=v;break;default:t=n=e.coordinate,a=(r=(o=c+ +h*f)+y*g)+y*m,i=v}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:i,y:a}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,i=e.orientation,a=e.mirror,s=e.axisLine,l=KY(KY(KY({},Aj(this.props,!1)),Aj(s,!1)),{},{fill:"none"});if("top"===i||"bottom"===i){var c=+("top"===i&&!a||"bottom"===i&&a);l=KY(KY({},l),{},{x1:t,y1:n+c*o,x2:t+r,y2:n+c*o})}else{var u=+("left"===i&&!a||"right"===i&&a);l=KY(KY({},l),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+o})}return f.createElement("line",$Y({},l,{className:ge("recharts-cartesian-axis-line",Dk(s,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var o=this,i=this.props,a=i.tickLine,s=i.stroke,l=i.tick,c=i.tickFormatter,u=i.unit,d=zY(KY(KY({},this.props),{},{ticks:e}),n,r),p=this.getTickTextAnchor(),h=this.getTickVerticalAnchor(),m=Aj(this.props,!1),y=Aj(l,!1),g=KY(KY({},m),{},{fill:"none"},Aj(a,!1)),v=d.map((function(e,n){var r=o.getTickLineCoord(e),i=r.line,v=r.tick,b=KY(KY(KY(KY({textAnchor:p,verticalAnchor:h},m),{},{stroke:"none",fill:s},y),v),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:c});return f.createElement(Wj,$Y({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},yj(o.props,e,n)),a&&f.createElement("line",$Y({},g,i,{className:ge("recharts-cartesian-axis-tick-line",Dk(a,"className"))})),l&&t.renderTickItem(l,b,"".concat(GS(c)?c(e.value,n):e.value).concat(u||"")))}));return f.createElement("g",{className:"recharts-cartesian-axis-ticks"},v)}},{key:"render",value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,o=t.height,i=t.ticksGenerator,a=t.className;if(t.hide)return null;var s=this.props,l=s.ticks,c=qY(s,WY),u=l;return GS(i)&&(u=l&&l.length>0?i(this.props):i(c)),r<=0||o<=0||!u||!u.length?null:f.createElement(Wj,{className:ge("recharts-cartesian-axis",a),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),nV.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(e,t,n){return f.isValidElement(e)?f.cloneElement(e,t):GS(e)?e(t):f.createElement(VD,$Y({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}])}(f.Component);ZY(QY,"displayName","CartesianAxis"),ZY(QY,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var eX=["type","layout","connectNulls","ref"],tX=["key"];function nX(e){return(nX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function oX(){return oX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},oX.apply(this,arguments)}function iX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function aX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iX(Object(n),!0).forEach((function(t){pX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sX(e){return function(e){if(Array.isArray(e))return lX(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return lX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lX(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hX(r.key),r)}}function uX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(uX=function(){return!!e})()}function fX(e){return(fX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function dX(e,t){return(dX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pX(e,t,n){return(t=hX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hX(e){var t=function(e){if("object"!=nX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nX(t)?t:t+""}var mX=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return pX(e=function(e,t,n){return t=fX(t),function(e,t){if(t&&("object"===nX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,uX()?Reflect.construct(t,n||[],fX(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),pX(e,"generateSimpleStrokeDasharray",(function(e,t){return"".concat(t,"px ").concat(e-t,"px")})),pX(e,"getStrokeDasharray",(function(n,r,o){var i=o.reduce((function(e,t){return e+t}));if(!i)return e.generateSimpleStrokeDasharray(r,n);for(var a=Math.floor(n/i),s=n%i,l=r-n,c=[],u=0,f=0;u<o.length;f+=o[u],++u)if(f+o[u]>s){c=[].concat(sX(o.slice(0,u)),[s-f]);break}var d=c.length%2==0?[0,l]:[l];return[].concat(sX(t.repeat(o,a)),sX(c),d).map((function(e){return"".concat(e,"px")})).join(", ")})),pX(e,"id",oj("recharts-line-")),pX(e,"pathRef",(function(t){e.mainCurve=t})),pX(e,"handleAnimationEnd",(function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()})),pX(e,"handleAnimationStart",(function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dX(e,t)}(t,e),function(e,t,n){return t&&cX(e.prototype,t),n&&cX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,o=n.xAxis,i=n.yAxis,a=n.layout,s=jj(n.children,tW);if(!s)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:pW(e.payload,t)}},c={clipPath:e?"url(#clipPath-".concat(t,")"):null};return f.createElement(Wj,c,s.map((function(e){return f.cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:r,xAxis:o,yAxis:i,layout:a,dataPointFormatter:l})})))}},{key:"renderDots",value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,i=o.dot,a=o.points,s=o.dataKey,l=Aj(this.props,!1),c=Aj(i,!0),u=a.map((function(e,n){var r=aX(aX(aX({key:"dot-".concat(n),r:3},l),c),{},{value:e.value,dataKey:s,cx:e.x,cy:e.y,index:n,payload:e.payload});return t.renderDotItem(i,r)})),d={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return f.createElement(Wj,oX({className:"recharts-line-dots",key:"dots"},d),u)}},{key:"renderCurveStatically",value:function(e,t,n,r){var o=this.props,i=o.type,a=o.layout,s=o.connectNulls;o.ref;var l=rX(o,eX),c=aX(aX(aX({},Aj(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},r),{},{type:i,layout:a,connectNulls:s});return f.createElement(BV,oX({},c,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,r=this.props,o=r.points,i=r.strokeDasharray,a=r.isAnimationActive,s=r.animationBegin,l=r.animationDuration,c=r.animationEasing,u=r.animationId,d=r.animateNewValues,p=r.width,h=r.height,m=this.state,y=m.prevPoints,g=m.totalLength;return f.createElement(eU,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(r){var a=r.t;if(y){var s=y.length/o.length,l=o.map((function(e,t){var n=Math.floor(t*s);if(y[n]){var r=y[n],o=sj(r.x,e.x),i=sj(r.y,e.y);return aX(aX({},e),{},{x:o(a),y:i(a)})}if(d){var l=sj(2*p,e.x),c=sj(h/2,e.y);return aX(aX({},e),{},{x:l(a),y:c(a)})}return aX(aX({},e),{},{x:e.x,y:e.y})}));return n.renderCurveStatically(l,e,t)}var c,u=sj(0,g)(a);if(i){var f="".concat(i).split(/[,\s]+/gim).map((function(e){return parseFloat(e)}));c=n.getStrokeDasharray(u,g,f)}else c=n.generateSimpleStrokeDasharray(g,u);return n.renderCurveStatically(o,e,t,{strokeDasharray:c})}))}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,i=this.state,a=i.prevPoints,s=i.totalLength;return o&&r&&r.length&&(!a&&s>0||!qB(a,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,o=t.points,i=t.className,a=t.xAxis,s=t.yAxis,l=t.top,c=t.left,u=t.width,d=t.height,p=t.isAnimationActive,h=t.id;if(n||!o||!o.length)return null;var m=this.state.isAnimationFinished,y=1===o.length,g=ge("recharts-line",i),v=a&&a.allowDataOverflow,b=s&&s.allowDataOverflow,x=v||b,w=Rk(h)?this.id:h,_=null!==(e=Aj(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},S=_.r,O=void 0===S?3:S,k=_.strokeWidth,j=void 0===k?2:k,E=(Tj(r)?r:{}).clipDot,P=void 0===E||E,C=2*O+j;return f.createElement(Wj,{className:g},v||b?f.createElement("defs",null,f.createElement("clipPath",{id:"clipPath-".concat(w)},f.createElement("rect",{x:v?c:c-u/2,y:b?l:l-d/2,width:v?u:2*u,height:b?d:2*d})),!P&&f.createElement("clipPath",{id:"clipPath-dots-".concat(w)},f.createElement("rect",{x:c-C/2,y:l-C/2,width:u+C,height:d+C}))):null,!y&&this.renderCurve(x,w),this.renderErrorBar(x,w),(y||r)&&this.renderDots(x,P,w),(!p||m)&&yV.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(sX(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(sX(r),sX(n));return r}},{key:"renderDotItem",value:function(e,t){var n;if(f.isValidElement(e))n=f.cloneElement(e,t);else if(GS(e))n=e(t);else{var r=t.key,o=rX(t,tX),i=ge("recharts-line-dot","boolean"!=typeof e?e.className:"");n=f.createElement(bU,oX({key:r},o,{className:i}))}return n}}])}(f.PureComponent);pX(mX,"displayName","Line"),pX(mX,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!CN.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),pX(mX,"getComposedData",(function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,i=e.yAxisTicks,a=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout;return aX({points:l.map((function(e,t){var l=pW(e,a);return"horizontal"===u?{x:PW({axis:n,ticks:o,bandSize:s,entry:e,index:t}),y:Rk(l)?null:r.scale(l),value:l,payload:e}:{x:Rk(l)?null:n.scale(l),y:PW({axis:r,ticks:i,bandSize:s,entry:e,index:t}),value:l,payload:e}})),layout:u},c)}));var yX,gX=["layout","type","stroke","connectNulls","isRange","ref"],vX=["key"];function bX(e){return(bX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wX(){return wX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wX.apply(this,arguments)}function _X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function SX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_X(Object(n),!0).forEach((function(t){PX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function OX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,CX(r.key),r)}}function kX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(kX=function(){return!!e})()}function jX(e){return(jX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function EX(e,t){return(EX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function PX(e,t,n){return(t=CX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CX(e){var t=function(e){if("object"!=bX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=bX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bX(t)?t:t+""}var TX=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return PX(e=function(e,t,n){return t=jX(t),function(e,t){if(t&&("object"===bX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,kX()?Reflect.construct(t,n||[],jX(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0}),PX(e,"id",oj("recharts-area-")),PX(e,"handleAnimationEnd",(function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),GS(t)&&t()})),PX(e,"handleAnimationStart",(function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),GS(t)&&t()})),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EX(e,t)}(t,e),function(e,t,n){return t&&OX(e.prototype,t),n&&OX(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"renderDots",value:function(e,n,r){var o=this.props.isAnimationActive,i=this.state.isAnimationFinished;if(o&&!i)return null;var a=this.props,s=a.dot,l=a.points,c=a.dataKey,u=Aj(this.props,!1),d=Aj(s,!0),p=l.map((function(e,n){var r=SX(SX(SX({key:"dot-".concat(n),r:3},u),d),{},{index:n,cx:e.x,cy:e.y,dataKey:c,value:e.value,payload:e.payload,points:l});return t.renderDotItem(s,r)})),h={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return f.createElement(Wj,wX({className:"recharts-area-dots"},h),p)}},{key:"renderHorizontalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,o=t.strokeWidth,i=r[0].x,a=r[r.length-1].x,s=e*Math.abs(i-a),l=CB(r.map((function(e){return e.y||0})));return tj(n)&&"number"==typeof n?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(CB(n.map((function(e){return e.y||0}))),l)),tj(l)?f.createElement("rect",{x:i<a?i:i-s,y:0,width:s,height:Math.floor(l+(o?parseInt("".concat(o),10):1))}):null}},{key:"renderVerticalRect",value:function(e){var t=this.props,n=t.baseLine,r=t.points,o=t.strokeWidth,i=r[0].y,a=r[r.length-1].y,s=e*Math.abs(i-a),l=CB(r.map((function(e){return e.x||0})));return tj(n)&&"number"==typeof n?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(CB(n.map((function(e){return e.x||0}))),l)),tj(l)?f.createElement("rect",{x:0,y:i<a?i:i-s,width:l+(o?parseInt("".concat(o),10):1),height:Math.floor(s)}):null}},{key:"renderClipRect",value:function(e){return"vertical"===this.props.layout?this.renderVerticalRect(e):this.renderHorizontalRect(e)}},{key:"renderAreaStatically",value:function(e,t,n,r){var o=this.props,i=o.layout,a=o.type,s=o.stroke,l=o.connectNulls,c=o.isRange;o.ref;var u=xX(o,gX);return f.createElement(Wj,{clipPath:n?"url(#clipPath-".concat(r,")"):null},f.createElement(BV,wX({},Aj(u,!0),{points:e,connectNulls:l,type:a,baseLine:t,layout:i,stroke:"none",className:"recharts-area-area"})),"none"!==s&&f.createElement(BV,wX({},Aj(this.props,!1),{className:"recharts-area-curve",layout:i,type:a,connectNulls:l,fill:"none",points:e})),"none"!==s&&c&&f.createElement(BV,wX({},Aj(this.props,!1),{className:"recharts-area-curve",layout:i,type:a,connectNulls:l,fill:"none",points:t})))}},{key:"renderAreaWithAnimation",value:function(e,t){var n=this,r=this.props,o=r.points,i=r.baseLine,a=r.isAnimationActive,s=r.animationBegin,l=r.animationDuration,c=r.animationEasing,u=r.animationId,d=this.state,p=d.prevPoints,h=d.prevBaseLine;return f.createElement(eU,{begin:s,duration:l,isActive:a,easing:c,from:{t:0},to:{t:1},key:"area-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(r){var a=r.t;if(p){var s,l=p.length/o.length,c=o.map((function(e,t){var n=Math.floor(t*l);if(p[n]){var r=p[n],o=sj(r.x,e.x),i=sj(r.y,e.y);return SX(SX({},e),{},{x:o(a),y:i(a)})}return e}));return s=tj(i)&&"number"==typeof i?sj(h,i)(a):Rk(i)||Jk(i)?sj(h,0)(a):i.map((function(e,t){var n=Math.floor(t*l);if(h[n]){var r=h[n],o=sj(r.x,e.x),i=sj(r.y,e.y);return SX(SX({},e),{},{x:o(a),y:i(a)})}return e})),n.renderAreaStatically(c,s,e,t)}return f.createElement(Wj,null,f.createElement("defs",null,f.createElement("clipPath",{id:"animationClipPath-".concat(t)},n.renderClipRect(a))),f.createElement(Wj,{clipPath:"url(#animationClipPath-".concat(t,")")},n.renderAreaStatically(o,i,e,t)))}))}},{key:"renderArea",value:function(e,t){var n=this.props,r=n.points,o=n.baseLine,i=n.isAnimationActive,a=this.state,s=a.prevPoints,l=a.prevBaseLine,c=a.totalLength;return i&&r&&r.length&&(!s&&c>0||!qB(s,r)||!qB(l,o))?this.renderAreaWithAnimation(e,t):this.renderAreaStatically(r,o,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,o=t.points,i=t.className,a=t.top,s=t.left,l=t.xAxis,c=t.yAxis,u=t.width,d=t.height,p=t.isAnimationActive,h=t.id;if(n||!o||!o.length)return null;var m=this.state.isAnimationFinished,y=1===o.length,g=ge("recharts-area",i),v=l&&l.allowDataOverflow,b=c&&c.allowDataOverflow,x=v||b,w=Rk(h)?this.id:h,_=null!==(e=Aj(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},S=_.r,O=void 0===S?3:S,k=_.strokeWidth,j=void 0===k?2:k,E=(Tj(r)?r:{}).clipDot,P=void 0===E||E,C=2*O+j;return f.createElement(Wj,{className:g},v||b?f.createElement("defs",null,f.createElement("clipPath",{id:"clipPath-".concat(w)},f.createElement("rect",{x:v?s:s-u/2,y:b?a:a-d/2,width:v?u:2*u,height:b?d:2*d})),!P&&f.createElement("clipPath",{id:"clipPath-dots-".concat(w)},f.createElement("rect",{x:s-C/2,y:a-C/2,width:u+C,height:d+C}))):null,y?null:this.renderArea(x,w),(r||y)&&this.renderDots(x,P,w),(!p||m)&&yV.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,curBaseLine:e.baseLine,prevPoints:t.curPoints,prevBaseLine:t.curBaseLine}:e.points!==t.curPoints||e.baseLine!==t.curBaseLine?{curPoints:e.points,curBaseLine:e.baseLine}:null}}])}(f.PureComponent);function AX(e){return(AX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(MX=function(){return!!e})()}function NX(e){return(NX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function DX(e,t){return(DX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function IX(e,t,n){return(t=RX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RX(e){var t=function(e){if("object"!=AX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=AX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==AX(t)?t:t+""}function LX(){return LX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LX.apply(this,arguments)}function zX(e){var t=e.xAxisId,n=JH(),r=QH(),o=GH(t);return null==o?null:f.createElement(QY,LX({},o,{className:ge("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return bW(e,!0)}}))}yX=TX,PX(TX,"displayName","Area"),PX(TX,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!CN.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"}),PX(TX,"getBaseValue",(function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue??i;if(tj(a)&&"number"==typeof a)return a;var s="horizontal"===o?r:n,l=s.scale.domain();if("number"===s.type){var c=Math.max(l[0],l[1]),u=Math.min(l[0],l[1]);return"dataMin"===a?u:"dataMax"===a||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return"dataMin"===a?l[0]:"dataMax"===a?l[1]:l[0]})),PX(TX,"getComposedData",(function(e){var t,n=e.props,r=e.item,o=e.xAxis,i=e.yAxis,a=e.xAxisTicks,s=e.yAxisTicks,l=e.bandSize,c=e.dataKey,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,h=n.layout,m=u&&u.length,y=yX.getBaseValue(n,r,o,i),g="horizontal"===h,v=!1,b=d.map((function(e,t){var n;m?n=u[f+t]:(n=pW(e,c),Array.isArray(n)?v=!0:n=[y,n]);var r=null==n[1]||m&&null==pW(e,c);return g?{x:PW({axis:o,ticks:a,bandSize:l,entry:e,index:t}),y:r?null:i.scale(n[1]),value:n,payload:e}:{x:r?null:o.scale(n[1]),y:PW({axis:i,ticks:s,bandSize:l,entry:e,index:t}),value:n,payload:e}}));return t=m||v?b.map((function(e){var t=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:null!=t&&null!=e.y?i.scale(t):null}:{x:null!=t?o.scale(t):null,y:e.y}})):g?i.scale(y):o.scale(y),SX({points:b,baseLine:t,layout:h,isRange:v},p)})),PX(TX,"renderDotItem",(function(e,t){var n;if(f.isValidElement(e))n=f.cloneElement(e,t);else if(GS(e))n=e(t);else{var r=ge("recharts-area-dot","boolean"!=typeof e?e.className:""),o=t.key,i=xX(t,vX);n=f.createElement(bU,wX({},i,{key:o,className:r}))}return n}));var BX=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=NX(t),function(e,t){if(t&&("object"===AX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,MX()?Reflect.construct(t,n||[],NX(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DX(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RX(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return f.createElement(zX,this.props)}}])}(f.Component);function FX(e){return(FX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function WX(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(WX=function(){return!!e})()}function VX(e){return(VX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $X(e,t){return($X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function UX(e,t,n){return(t=KX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KX(e){var t=function(e){if("object"!=FX(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=FX(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==FX(t)?t:t+""}function qX(){return qX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qX.apply(this,arguments)}IX(BX,"displayName","XAxis"),IX(BX,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var HX=function(e){var t=e.yAxisId,n=JH(),r=QH(),o=ZH(t);return null==o?null:f.createElement(QY,qX({},o,{className:ge("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return bW(e,!0)}}))},YX=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=VX(t),function(e,t){if(t&&("object"===FX(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,WX()?Reflect.construct(t,n||[],VX(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$X(e,t)}(t,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,KX(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(t,[{key:"render",value:function(){return f.createElement(HX,this.props)}}])}(f.Component);function XX(e){return function(e){if(Array.isArray(e))return GX(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return GX(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GX(e,t)}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function GX(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}UX(YX,"displayName","YAxis"),UX(YX,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var ZX=function(e,t,n,r,o){var i=jj(e,fY),a=jj(e,wY),s=[].concat(XX(i),XX(a)),l=jj(e,AY),c="".concat(r,"Id"),u=r[0],f=t;if(s.length&&(f=s.reduce((function(e,t){if(t.props[c]===n&&Wq(t.props,"extendDomain")&&tj(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e}),f)),l.length){var d="".concat(u,"1"),p="".concat(u,"2");f=l.reduce((function(e,t){if(t.props[c]===n&&Wq(t.props,"extendDomain")&&tj(t.props[d])&&tj(t.props[p])){var r=t.props[d],o=t.props[p];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e}),f)}return o&&o.length&&(f=o.reduce((function(e,t){return tj(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e}),f)),f},JX={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],f=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),f){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,a),!0}for(c=1,l=new Array(f-1);c<f;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var d,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),f){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(d=1,l=new Array(f-1);d<f;d++)l[d-1]=arguments[d];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn===t&&(!o||s.once)&&(!r||s.context===r)&&a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(JX);var QX=new(m(JX.exports)),eG="recharts.syncMouseEvents";function tG(e){return(tG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nG(e,t,n){return(t=rG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rG(e){var t=function(e){if("object"!=tG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tG(t)?t:t+""}var oG=function(){return function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),nG(this,"activeIndex",0),nG(this,"coordinateList",[]),nG(this,"layout","horizontal")}),[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,i=void 0===o?null:o,a=e.layout,s=void 0===a?null:a,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,f=void 0===u?null:u;this.coordinateList=null!==(t=r??this.coordinateList)&&void 0!==t?t:[],this.container=i??this.container,this.layout=s??this.layout,this.offset=c??this.offset,this.mouseHandlerCallback=f??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,i=n.height,a=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+a+s,u=o+this.offset.top+i/2+l;this.mouseHandlerCallback({pageX:c,pageY:u})}}}])}();function iG(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,i=e.endAngle;return{points:[UW(t,n,r,o),UW(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function aG(e,t,n){var r,o,i,a;if("horizontal"===e)i=r=t.x,o=n.top,a=n.top+n.height;else if("vertical"===e)a=o=t.y,r=n.left,i=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return iG(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,f=t.angle,d=UW(s,l,c,f),p=UW(s,l,u,f);r=d.x,o=d.y,i=p.x,a=p.y}return[{x:r,y:o},{x:i,y:a}]}function sG(e){return(sG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lG(Object(n),!0).forEach((function(t){uG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function uG(e,t,n){return t=function(e){var t=function(e){if("object"!=sG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=sG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==sG(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fG(e){var t,n,r=e.element,o=e.tooltipEventType,i=e.isActive,a=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,d=e.layout,p=e.chartName,h=null!==(t=r.props.cursor)&&void 0!==t?t:null===(n=r.type.defaultProps)||void 0===n?void 0:n.cursor;if(!r||!h||!i||!a||"ScatterChart"!==p&&"axis"!==o)return null;var m,y=BV;if("ScatterChart"===p)m=a,y=jU;else if("BarChart"===p)m=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,a,l,u),y=uU;else if("radial"===d){var g=iG(a),v=g.cx,b=g.cy,x=g.radius;m={cx:v,cy:b,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:x,outerRadius:x},y=kV}else m={points:aG(d,a,l)},y=BV;var w=cG(cG(cG(cG({stroke:"#ccc",pointerEvents:"none"},l),m),Aj(h,!1)),{},{payload:s,payloadIndex:c,className:ge("recharts-tooltip-cursor",h.className)});return(0,f.isValidElement)(h)?(0,f.cloneElement)(h,w):(0,f.createElement)(y,w)}var dG=["item"],pG=["children","className","width","height","style","compact","title","desc"];function hG(e){return(hG="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mG(){return mG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mG.apply(this,arguments)}function yG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||_G(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gG(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function vG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(vG=function(){return!!e})()}function bG(e){return(bG=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function xG(e,t){return(xG=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wG(e){return function(e){if(Array.isArray(e))return SG(e)}(e)||function(e){if(typeof Symbol<"u"&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_G(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _G(e,t){if(e){if("string"==typeof e)return SG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SG(e,t)}}function SG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OG(Object(n),!0).forEach((function(t){jG(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OG(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function jG(e,t,n){return(t=EG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EG(e){var t=function(e){if("object"!=hG(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=hG(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hG(t)?t:t+""}var PG={xAxis:["bottom","top"],yAxis:["left","right"]},CG={width:"100%",height:"100%"},TG={x:0,y:0};function AG(e){return e}var MG=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,i=(n??[]).reduce((function(e,t){var n=t.props.data;return n&&n.length?[].concat(wG(e),wG(n)):e}),[]);return i.length>0?i:e&&e.length&&tj(r)&&tj(o)?e.slice(r,o+1):[]};function NG(e){return"number"===e?[0,"auto"]:void 0}var DG=function(e,t,n,r){var o=e.graphicalItems,i=e.tooltipAxis,a=MG(t,e);return n<0||!o||!o.length||n>=a.length?null:o.reduce((function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(c=i.dataKey&&!i.allowDuplicatedCategory?lj(void 0===u?a:u,i.dataKey,r):u&&u[n]||a[n])?[].concat(wG(o),[RW(s,c)]):o}),[])},IG=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},i=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),a=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=-1,a=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(a<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l<a;l++){var c=l>0?r[l-1].coordinate:r[a-1].coordinate,u=r[l].coordinate,f=l>=a-1?r[0].coordinate:r[l+1].coordinate,d=void 0;if(Qk(u-c)!==Qk(f-u)){var p=[];if(Qk(f-u)===Qk(s[1]-s[0])){d=f;var h=u+s[1]-s[0];p[0]=Math.min(h,(h+c)/2),p[1]=Math.max(h,(h+c)/2)}else{d=c;var m=f+s[1]-s[0];p[0]=Math.min(u,(m+u)/2),p[1]=Math.max(u,(m+u)/2)}var y=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(e>y[0]&&e<=y[1]||e>=p[0]&&e<=p[1]){i=r[l].index;break}}else{var g=Math.min(c,f),v=Math.max(c,f);if(e>(g+u)/2&&e<=(v+u)/2){i=r[l].index;break}}}else for(var b=0;b<a;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===a-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){i=n[b].index;break}return i}(i,a,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,f=DG(e,t,c,u),d=function(e,t,n,r){var o=t.find((function(e){return e&&e.index===n}));if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var i=o.coordinate,a=r.radius;return kG(kG(kG({},r),UW(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,l=r.angle;return kG(kG(kG({},r),UW(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return TG}(n,a,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:f,activeCoordinate:d}}return null},RG=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,i=t.graphicalItems,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),f=jj(c,o),d={};return f&&f.length?d=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,f=e.stackOffset,d=vW(c,o);return n.reduce((function(t,n){var p,h=void 0!==n.type.defaultProps?kG(kG({},n.type.defaultProps),n.props):n.props,m=h.type,y=h.dataKey,g=h.allowDataOverflow,v=h.allowDuplicatedCategory,b=h.scale,x=h.ticks,w=h.includeHidden,_=h[i];if(t[_])return t;var S,O,k,j=MG(e.data,{graphicalItems:r.filter((function(e){var t;return(i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i])===_})),dataStartIndex:s,dataEndIndex:l}),E=j.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&tj(r)&&tj(o))return!0}return!1})(h.domain,g,m)&&(S=NW(h.domain,null,g),d&&("number"===m||"auto"!==b)&&(k=hW(j,y,"category")));var P=NG(m);if(!S||0===S.length){var C,T=null!==(C=h.domain)&&void 0!==C?C:P;if(y){if(S=hW(j,y,m),"category"===m&&d){var A=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(S);v&&A?(O=S,S=mq(0,E)):v||(S=IW(T,S,n).reduce((function(e,t){return e.indexOf(t)>=0?e:[].concat(wG(e),[t])}),[]))}else if("category"===m)S=v?S.filter((function(e){return""!==e&&!Rk(e)})):IW(T,S,n).reduce((function(e,t){return e.indexOf(t)>=0||""===t||Rk(t)?e:[].concat(wG(e),[t])}),[]);else if("number"===m){var M=function(e,t,n,r,o){var i=t.map((function(t){return yW(e,t,n,o,r)})).filter((function(e){return!Rk(e)}));return i&&i.length?i.reduce((function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}),[1/0,-1/0]):null}(j,r.filter((function(e){var t,n,r=i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===_&&(w||!o)})),y,o,c);M&&(S=M)}d&&("number"===m||"auto"!==b)&&(k=hW(j,y,"category"))}else S=d?mq(0,E):a&&a[_]&&a[_].hasStack&&"number"===m?"expand"===f?[0,1]:TW(a[_].stackGroups,s,l):gW(j,r.filter((function(e){var t=i in e.props?e.props[i]:e.type.defaultProps[i],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===_&&(w||!n)})),m,c,!0);if("number"===m)S=ZX(u,S,_,o,x),T&&(S=NW(T,S,g));else if("category"===m&&T){var N=T;S.every((function(e){return N.indexOf(e)>=0}))&&(S=N)}}return kG(kG({},t),{},jG({},_,kG(kG({},h),{},{axisType:o,domain:S,categoricalDomain:k,duplicateDomain:O,originalDomain:null!==(p=h.domain)&&void 0!==p?p:P,isCategorical:d,layout:c})))}),{})}(e,{axes:f,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l}):i&&i.length&&(d=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,i=t.axisIdKey,a=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,f=MG(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),d=f.length,p=vW(c,o),h=-1;return n.reduce((function(e,t){var m,y=(void 0!==t.type.defaultProps?kG(kG({},t.type.defaultProps),t.props):t.props)[i],g=NG("number");return e[y]?e:(h++,p?m=mq(0,d):a&&a[y]&&a[y].hasStack?(m=TW(a[y].stackGroups,s,l),m=ZX(u,m,y,o)):(m=NW(g,gW(f,n.filter((function(e){var t,n,r=i in e.props?e.props[i]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[i],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===y&&!o})),"number",c),r.defaultProps.allowDataOverflow),m=ZX(u,m,y,o)),kG(kG({},e),{},jG({},y,kG(kG({axisType:o},r.defaultProps),{},{hide:!0,orientation:Dk(PG,"".concat(o,".").concat(h%2),null),domain:m,originalDomain:g,isCategorical:p,layout:c}))))}),{})}(e,{Axis:o,graphicalItems:i,axisType:r,axisIdKey:u,stackGroups:a,dataStartIndex:s,dataEndIndex:l})),d},LG=function(e){var t=e.children,n=e.defaultShowTooltip,r=Ej(t,Mq),o=0,i=0;return e.data&&0!==e.data.length&&(i=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(i=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:i,activeTooltipIndex:-1,isTooltipActive:!!n}},zG=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},BG=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},FG=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,o=void 0===r?"axis":r,i=e.validateTooltipEventTypes,a=void 0===i?["axis"]:i,s=e.axisComponents,l=e.legendContent,c=e.formatAxisMap,u=e.defaultProps,d=function(e,r){var o=e.props,i=e.dataStartIndex,a=e.dataEndIndex,l=e.updateId;if(!Pj({props:o}))return null;var u=o.children,f=o.layout,d=o.stackOffset,p=o.data,h=o.reverseStackOrder,m=zG(f),y=m.numericAxisName,g=m.cateAxisName,v=jj(u,n),b=function(e,t,n,r,o,i){if(!e)return null;var a=(i?t.reverse():t).reduce((function(e,t){var o,i=null!==(o=t.type)&&void 0!==o&&o.defaultProps?fW(fW({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(i.hide)return e;var s=i[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(nj(a)){var c=l.stackGroups[a]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[a]=c}else l.stackGroups[oj("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return fW(fW({},e),{},dW({},s,l))}),{});return Object.keys(a).reduce((function(t,i){var s=a[i];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce((function(t,i){var a=s.stackGroups[i];return fW(fW({},t),{},dW({},i,{numericAxisId:n,cateAxisId:r,items:a.items,stackedData:jW(e,a.items,o)}))}),{})),fW(fW({},t),{},dW({},i,s))}),{})}(p,v,"".concat(y,"Id"),"".concat(g,"Id"),d,h),x=s.reduce((function(e,t){var n="".concat(t.axisType,"Map");return kG(kG({},e),{},jG({},n,RG(o,kG(kG({},t),{},{graphicalItems:v,stackGroups:t.axisType===y&&b,dataStartIndex:i,dataEndIndex:a}))))}),{}),w=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,i=e.yAxisMap,a=void 0===i?{}:i,s=n.width,l=n.height,c=n.children,u=n.margin||{},f=Ej(c,Mq),d=Ej(c,uM),p=Object.keys(a).reduce((function(e,t){var n=a[t],r=n.orientation;return n.mirror||n.hide?e:kG(kG({},e),{},jG({},r,e[r]+n.width))}),{left:u.left||0,right:u.right||0}),h=Object.keys(o).reduce((function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:kG(kG({},e),{},jG({},r,Dk(e,"".concat(r))+n.height))}),{top:u.top||0,bottom:u.bottom||0}),m=kG(kG({},h),p),y=m.bottom;f&&(m.bottom+=f.props.height||Mq.defaultProps.height),d&&t&&(m=function(e,t,n,r){var o=n.children,i=n.width,a=n.margin,s=i-(a.left||0)-(a.right||0),l=aW({children:o,legendWidth:s});if(l){var c=r||{},u=c.width,f=c.height,d=l.align,p=l.verticalAlign,h=l.layout;if(("vertical"===h||"horizontal"===h&&"middle"===p)&&"center"!==d&&tj(e[d]))return fW(fW({},e),{},dW({},d,e[d]+(u||0)));if(("horizontal"===h||"vertical"===h&&"center"===d)&&"middle"!==p&&tj(e[p]))return fW(fW({},e),{},dW({},p,e[p]+(f||0)))}return e}(m,0,n,t));var g=s-m.left-m.right,v=l-m.top-m.bottom;return kG(kG({brushBottom:y},m),{},{width:Math.max(g,0),height:Math.max(v,0)})}(kG(kG({},x),{},{props:o,graphicalItems:v}),null==r?void 0:r.legendBBox);Object.keys(x).forEach((function(e){x[e]=c(o,x[e],w,e.replace("Map",""),t)}));var _=function(e){var t=aj(e),n=bW(t,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:iN(n,(function(e){return e.coordinate})),tooltipAxis:t,tooltipAxisBandSize:DW(t,n)}}(x["".concat(g,"Map")]),S=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,i=t.updateId,a=t.dataStartIndex,l=t.dataEndIndex,c=e.barSize,u=e.layout,f=e.barGap,d=e.barCategoryGap,p=e.maxBarSize,h=zG(u),m=h.numericAxisName,y=h.cateAxisName,g=function(e){return!(!e||!e.length)&&e.some((function(e){var t=_j(e&&e.type);return t&&t.indexOf("Bar")>=0}))}(n),v=[];return n.forEach((function(n,h){var b=MG(e.data,{graphicalItems:[n],dataStartIndex:a,dataEndIndex:l}),x=void 0!==n.type.defaultProps?kG(kG({},n.type.defaultProps),n.props):n.props,w=x.dataKey,_=x.maxBarSize,S=x["".concat(m,"Id")],O=x["".concat(y,"Id")],k=s.reduce((function(e,n){var r=t["".concat(n.axisType,"Map")],o=x["".concat(n.axisType,"Id")];r&&r[o]||"zAxis"===n.axisType||KF();var i=r[o];return kG(kG({},e),{},jG(jG({},n.axisType,i),"".concat(n.axisType,"Ticks"),bW(i)))}),{}),j=k[y],E=k["".concat(y,"Ticks")],P=r&&r[S]&&r[S].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?fW(fW({},e.type.defaultProps),e.props):e.props).stackId;if(nj(r)){var o=t[r];if(o){var i=o.items.indexOf(e);return i>=0?o.stackedData[i]:null}}return null}(n,r[S].stackGroups),C=_j(n.type).indexOf("Bar")>=0,T=DW(j,E),A=[],M=g&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,o=void 0===r?{}:r;if(!o)return{};for(var i={},a=Object.keys(o),s=0,l=a.length;s<l;s++)for(var c=o[a[s]].stackGroups,u=Object.keys(c),f=0,d=u.length;f<d;f++){var p=c[u[f]],h=p.items,m=p.cateAxisId,y=h.filter((function(e){return _j(e.type).indexOf("Bar")>=0}));if(y&&y.length){var g=y[0].type.defaultProps,v=void 0!==g?fW(fW({},g),y[0].props):y[0].props,b=v.barSize,x=v[m];i[x]||(i[x]=[]);var w=Rk(b)?t:b;i[x].push({item:y[0],stackList:y.slice(1),barSize:Rk(w)?void 0:ij(w,n,0)})}}return i}({barSize:c,stackGroups:r,totalSize:BG(k,y)});if(C){var N,D,I=Rk(_)?p:_,R=null!==(N=null!==(D=DW(j,E,!0))&&void 0!==D?D:I)&&void 0!==N?N:0;A=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,i=void 0===o?[]:o,a=e.maxBarSize,s=i.length;if(s<1)return null;var l,c=ij(t,r,0,!0),u=[];if(i[0].barSize===+i[0].barSize){var f=!1,d=r/s,p=i.reduce((function(e,t){return e+t.barSize||0}),0);(p+=(s-1)*c)>=r&&(p-=(s-1)*c,c=0),p>=r&&d>0&&(f=!0,p=s*(d*=.9));var h={offset:((r-p)/2|0)-c,size:0};l=i.reduce((function(e,t){var n={item:t.item,position:{offset:h.offset+h.size+c,size:f?d:t.barSize}},r=[].concat(lW(e),[n]);return h=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:h})})),r}),u)}else{var m=ij(n,r,0,!0);r-2*m-(s-1)*c<=0&&(c=0);var y=(r-2*m-(s-1)*c)/s;y>1&&(y>>=0);var g=a===+a?Math.min(y,a):y;l=i.reduce((function(e,t,n){var r=[].concat(lW(e),[{item:t.item,position:{offset:m+(y+c)*n+(y-g)/2,size:g}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach((function(e){r.push({item:e,position:r[r.length-1].position})})),r}),u)}return l}({barGap:f,barCategoryGap:d,bandSize:R!==T?R:T,sizeList:M[O],maxBarSize:I}),R!==T&&(A=A.map((function(e){return kG(kG({},e),{},{position:kG(kG({},e.position),{},{offset:e.position.offset-R/2})})})))}var L=n&&n.type&&n.type.getComposedData;L&&v.push({props:kG(kG({},L(kG(kG({},k),{},{displayedData:b,props:e,dataKey:w,item:n,bandSize:T,barPosition:A,offset:o,stackedData:P,layout:u,dataStartIndex:a,dataEndIndex:l}))),{},jG(jG(jG({key:n.key||"item-".concat(h)},m,k[m]),y,k[y]),"animationId",i)),childIndex:Ij(n,e.children),item:n})})),v}(o,kG(kG({},x),{},{dataStartIndex:i,dataEndIndex:a,updateId:l,graphicalItems:v,stackGroups:b,offset:w}));return kG(kG({formattedGraphicalItems:S,graphicalItems:v,offset:w,stackGroups:b},_),x)},p=function(e){function n(e){var r,o,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),jG(i=function(e,t,n){return t=bG(t),function(e,t){if(t&&("object"===hG(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,vG()?Reflect.construct(t,n||[],bG(e).constructor):t.apply(e,n))}(this,n,[e]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),jG(i,"accessibilityManager",new oG),jG(i,"handleLegendBBoxUpdate",(function(e){if(e){var t=i.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;i.setState(kG({legendBBox:e},d({props:i.props,dataStartIndex:n,dataEndIndex:r,updateId:o},kG(kG({},i.state),{},{legendBBox:e}))))}})),jG(i,"handleReceiveSyncEvent",(function(e,t,n){if(i.props.syncId===e){if(n===i.eventEmitterSymbol&&"function"!=typeof i.props.syncMethod)return;i.applySyncEvent(t)}})),jG(i,"handleBrushChange",(function(e){var t=e.startIndex,n=e.endIndex;if(t!==i.state.dataStartIndex||n!==i.state.dataEndIndex){var r=i.state.updateId;i.setState((function(){return kG({dataStartIndex:t,dataEndIndex:n},d({props:i.props,dataStartIndex:t,dataEndIndex:n,updateId:r},i.state))})),i.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}})),jG(i,"handleMouseEnter",(function(e){var t=i.getMouseInfo(e);if(t){var n=kG(kG({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseEnter;GS(r)&&r(n,e)}})),jG(i,"triggeredAfterMouseMove",(function(e){var t=i.getMouseInfo(e),n=t?kG(kG({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};i.setState(n),i.triggerSyncEvent(n);var r=i.props.onMouseMove;GS(r)&&r(n,e)})),jG(i,"handleItemMouseEnter",(function(e){i.setState((function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}}))})),jG(i,"handleItemMouseLeave",(function(){i.setState((function(){return{isTooltipActive:!1}}))})),jG(i,"handleMouseMove",(function(e){e.persist(),i.throttleTriggeredAfterMouseMove(e)})),jG(i,"handleMouseLeave",(function(e){i.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};i.setState(t),i.triggerSyncEvent(t);var n=i.props.onMouseLeave;GS(n)&&n(t,e)})),jG(i,"handleOuterEvent",(function(e){var t,n=function(e){var t=e&&e.type;return t&&wj[t]?wj[t]:null}(e),r=Dk(i.props,"".concat(n));n&&GS(r)&&r(null!==(t=/.*touch.*/i.test(n)?i.getMouseInfo(e.changedTouches[0]):i.getMouseInfo(e))&&void 0!==t?t:{},e)})),jG(i,"handleClick",(function(e){var t=i.getMouseInfo(e);if(t){var n=kG(kG({},t),{},{isTooltipActive:!0});i.setState(n),i.triggerSyncEvent(n);var r=i.props.onClick;GS(r)&&r(n,e)}})),jG(i,"handleMouseDown",(function(e){var t=i.props.onMouseDown;GS(t)&&t(i.getMouseInfo(e),e)})),jG(i,"handleMouseUp",(function(e){var t=i.props.onMouseUp;GS(t)&&t(i.getMouseInfo(e),e)})),jG(i,"handleTouchMove",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.throttleTriggeredAfterMouseMove(e.changedTouches[0])})),jG(i,"handleTouchStart",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseDown(e.changedTouches[0])})),jG(i,"handleTouchEnd",(function(e){null!=e.changedTouches&&e.changedTouches.length>0&&i.handleMouseUp(e.changedTouches[0])})),jG(i,"triggerSyncEvent",(function(e){void 0!==i.props.syncId&&QX.emit(eG,i.props.syncId,e,i.eventEmitterSymbol)})),jG(i,"applySyncEvent",(function(e){var t=i.props,n=t.layout,r=t.syncMethod,o=i.state.updateId,a=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)i.setState(kG({dataStartIndex:a,dataEndIndex:s},d({props:i.props,dataStartIndex:a,dataEndIndex:s,updateId:o},i.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,f=i.state,p=f.offset,h=f.tooltipTicks;if(!p)return;if("function"==typeof r)u=r(h,e);else if("value"===r){u=-1;for(var m=0;m<h.length;m++)if(h[m].value===e.activeLabel){u=m;break}}var y=kG(kG({},p),{},{x:p.left,y:p.top}),g=Math.min(l,y.x+y.width),v=Math.min(c,y.y+y.height),b=h[u]&&h[u].value,x=DG(i.state,i.props.data,u),w=h[u]?{x:"horizontal"===n?h[u].coordinate:g,y:"horizontal"===n?v:h[u].coordinate}:TG;i.setState(kG(kG({},e),{},{activeLabel:b,activeCoordinate:w,activePayload:x,activeTooltipIndex:u}))}else i.setState(e)})),jG(i,"renderCursor",(function(e){var n,r=i.state,o=r.isTooltipActive,a=r.activeCoordinate,s=r.activePayload,l=r.offset,c=r.activeTooltipIndex,u=r.tooltipAxisBandSize,d=i.getTooltipEventType(),p=null!==(n=e.props.active)&&void 0!==n?n:o,h=i.props.layout,m=e.key||"_recharts-cursor";return f.createElement(fG,{key:m,activeCoordinate:a,activePayload:s,activeTooltipIndex:c,chartName:t,element:e,isActive:p,layout:h,offset:l,tooltipAxisBandSize:u,tooltipEventType:d})})),jG(i,"renderPolarAxis",(function(e,t,n){var r=Dk(e,"type.axisType"),o=Dk(i.state,"".concat(r,"Map")),a=e.type.defaultProps,s=void 0!==a?kG(kG({},a),e.props):e.props,l=o&&o[s["".concat(r,"Id")]];return(0,f.cloneElement)(e,kG(kG({},l),{},{className:ge(r,l.className),key:e.key||"".concat(t,"-").concat(n),ticks:bW(l,!0)}))})),jG(i,"renderPolarGrid",(function(e){var t=e.props,n=t.radialLines,r=t.polarAngles,o=t.polarRadius,a=i.state,s=a.radiusAxisMap,l=a.angleAxisMap,c=aj(s),u=aj(l),d=u.cx,p=u.cy,h=u.innerRadius,m=u.outerRadius;return(0,f.cloneElement)(e,{polarAngles:Array.isArray(r)?r:bW(u,!0).map((function(e){return e.coordinate})),polarRadius:Array.isArray(o)?o:bW(c,!0).map((function(e){return e.coordinate})),cx:d,cy:p,innerRadius:h,outerRadius:m,key:e.key||"polar-grid",radialLines:n})})),jG(i,"renderLegend",(function(){var e=i.state.formattedGraphicalItems,t=i.props,n=t.children,r=t.width,o=t.height,a=i.props.margin||{},s=r-(a.left||0)-(a.right||0),c=aW({children:n,formattedGraphicalItems:e,legendWidth:s,legendContent:l});if(!c)return null;var u=c.item,d=gG(c,dG);return(0,f.cloneElement)(u,kG(kG({},d),{},{chartWidth:r,chartHeight:o,margin:a,onBBoxUpdate:i.handleLegendBBoxUpdate}))})),jG(i,"renderTooltip",(function(){var e,t=i.props,n=t.children,r=t.accessibilityLayer,o=Ej(n,BN);if(!o)return null;var a=i.state,s=a.isTooltipActive,l=a.activeCoordinate,c=a.activePayload,u=a.activeLabel,d=a.offset,p=null!==(e=o.props.active)&&void 0!==e?e:s;return(0,f.cloneElement)(o,{viewBox:kG(kG({},d),{},{x:d.left,y:d.top}),active:p,label:u,payload:p?c:[],coordinate:l,accessibilityLayer:r})})),jG(i,"renderBrush",(function(e){var t=i.props,n=t.margin,r=t.data,o=i.state,a=o.offset,s=o.dataStartIndex,l=o.dataEndIndex,c=o.updateId;return(0,f.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:wW(i.handleBrushChange,e.props.onChange),data:r,x:tj(e.props.x)?e.props.x:a.left,y:tj(e.props.y)?e.props.y:a.top+a.height+a.brushBottom-(n.bottom||0),width:tj(e.props.width)?e.props.width:a.width,startIndex:s,endIndex:l,updateId:"brush-".concat(c)})})),jG(i,"renderReferenceElement",(function(e,t,n){if(!e)return null;var r=i.clipPathId,o=i.state,a=o.xAxisMap,s=o.yAxisMap,l=o.offset,c=e.type.defaultProps||{},u=e.props,d=u.xAxisId,p=void 0===d?c.xAxisId:d,h=u.yAxisId,m=void 0===h?c.yAxisId:h;return(0,f.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(n),xAxis:a[p],yAxis:s[m],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:r})})),jG(i,"renderActivePoints",(function(e){var t=e.item,r=e.activePoint,o=e.basePoint,i=e.childIndex,a=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?kG(kG({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,f=kG(kG({index:i,dataKey:c.dataKey,cx:r.x,cy:r.y,r:4,fill:mW(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},Aj(u,!1)),mj(u));return s.push(n.renderActiveDot(u,f,"".concat(l,"-activePoint-").concat(i))),o?s.push(n.renderActiveDot(u,kG(kG({},f),{},{cx:o.x,cy:o.y}),"".concat(l,"-basePoint-").concat(i))):a&&s.push(null),s})),jG(i,"renderGraphicChild",(function(e,t,n){var r=i.filterFormatItem(e,t,n);if(!r)return null;var o=i.getTooltipEventType(),a=i.state,s=a.isTooltipActive,l=a.tooltipAxis,c=a.activeTooltipIndex,u=a.activeLabel,d=Ej(i.props.children,BN),p=r.props,h=p.points,m=p.isRange,y=p.baseLine,g=void 0!==r.item.type.defaultProps?kG(kG({},r.item.type.defaultProps),r.item.props):r.item.props,v=g.activeDot,b=g.hide,x=g.activeBar,w=g.activeShape,_=!(b||!s||!d||!(v||x||w)),S={};"axis"!==o&&d&&"click"===d.props.trigger?S={onClick:wW(i.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(S={onMouseLeave:wW(i.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:wW(i.handleItemMouseEnter,e.props.onMouseEnter)});var O=(0,f.cloneElement)(e,kG(kG({},r.props),S));if(_){if(!(c>=0)){var k,j=(null!==(k=i.getItemByXY(i.state.activeCoordinate))&&void 0!==k?k:{graphicalItem:O}).graphicalItem,E=j.item,P=void 0===E?e:E,C=j.childIndex,T=kG(kG(kG({},r.props),S),{},{activeIndex:C});return[(0,f.cloneElement)(P,T),null,null]}var A,M;if(l.dataKey&&!l.allowDuplicatedCategory){var N="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());A=lj(h,N,u),M=m&&y&&lj(y,N,u)}else A=null==h?void 0:h[c],M=m&&y&&y[c];if(w||x){var D=void 0!==e.props.activeIndex?e.props.activeIndex:c;return[(0,f.cloneElement)(e,kG(kG(kG({},r.props),S),{},{activeIndex:D})),null,null]}if(!Rk(A))return[O].concat(wG(i.renderActivePoints({item:r,activePoint:A,basePoint:M,childIndex:c,isRange:m})))}return m?[O,null,null]:[O,null]})),jG(i,"renderCustomized",(function(e,t,n){return(0,f.cloneElement)(e,kG(kG({key:"recharts-customized-".concat(n)},i.props),i.state))})),jG(i,"renderMap",{CartesianGrid:{handler:AG,once:!0},ReferenceArea:{handler:i.renderReferenceElement},ReferenceLine:{handler:AG},ReferenceDot:{handler:i.renderReferenceElement},XAxis:{handler:AG},YAxis:{handler:AG},Brush:{handler:i.renderBrush,once:!0},Bar:{handler:i.renderGraphicChild},Line:{handler:i.renderGraphicChild},Area:{handler:i.renderGraphicChild},Radar:{handler:i.renderGraphicChild},RadialBar:{handler:i.renderGraphicChild},Scatter:{handler:i.renderGraphicChild},Pie:{handler:i.renderGraphicChild},Funnel:{handler:i.renderGraphicChild},Tooltip:{handler:i.renderCursor,once:!0},PolarGrid:{handler:i.renderPolarGrid,once:!0},PolarAngleAxis:{handler:i.renderPolarAxis},PolarRadiusAxis:{handler:i.renderPolarAxis},Customized:{handler:i.renderCustomized}}),i.clipPathId="".concat(null!==(r=e.id)&&void 0!==r?r:oj("recharts"),"-clip"),i.throttleTriggeredAfterMouseMove=aD(i.triggeredAfterMouseMove,null!==(o=e.throttleDelay)&&void 0!==o?o:1e3/60),i.state={},i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xG(e,t)}(n,e),function(e,t){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,EG(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(n,[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,i=Ej(t,BN);if(i){var a=i.props.defaultIndex;if(!("number"!=typeof a||a<0||a>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[a]&&this.state.tooltipTicks[a].value,l=DG(this.state,n,a,s),c=this.state.tooltipTicks[a].coordinate,u=(this.state.offset.top+r)/2,f="horizontal"===o?{x:c,y:u}:{y:c,x:u},d=this.state.formattedGraphicalItems.find((function(e){return"Scatter"===e.item.type.name}));d&&(f=kG(kG({},f),d.props.points[a].tooltipPosition),l=d.props.points[a].tooltipPayload);var p={activeTooltipIndex:a,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:f};this.setState(p),this.renderCursor(i),this.accessibilityManager.setIndex(a)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){Mj([Ej(e.children,BN)],[Ej(this.props.children,BN)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=Ej(this.props.children,BN);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return a.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t=this.container,n=t.getBoundingClientRect(),r=function(e){return{top:e.top+window.scrollY-document.documentElement.clientTop,left:e.left+window.scrollX-document.documentElement.clientLeft}}(n),o={chartX:Math.round(e.pageX-r.left),chartY:Math.round(e.pageY-r.top)},i=n.width/t.offsetWidth||1,a=this.inRange(o.chartX,o.chartY,i);if(!a)return null;var s=this.state,l=s.xAxisMap,c=s.yAxisMap;if("axis"!==this.getTooltipEventType()&&l&&c){var u=aj(l).scale,f=aj(c).scale,d=u&&u.invert?u.invert(o.chartX):null,p=f&&f.invert?f.invert(o.chartY):null;return kG(kG({},o),{},{xValue:d,yValue:p})}var h=IG(this.state,this.props.data,this.props.layout,a);return h?kG(kG({},o),h):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,i=t/n;if("horizontal"===r||"vertical"===r){var a=this.state.offset;return o>=a.left&&o<=a.left+a.width&&i>=a.top&&i<=a.top+a.height?{x:o,y:i}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var u=aj(l);return HW({x:o,y:i},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=Ej(e,BN),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd}),kG(kG({},mj(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){QX.on(eG,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){QX.removeListener(eG,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,i=r.length;o<i;o++){var a=r[o];if(a.item===e||a.props.key===e.key||t===_j(a.item.type)&&n===a.childIndex)return a}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,o=t.height,i=t.width;return f.createElement("defs",null,f.createElement("clipPath",{id:e},f.createElement("rect",{x:n,y:r,height:o,width:i})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=yG(t,2),r=n[0],o=n[1];return kG(kG({},e),{},jG({},r,o.scale))}),{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce((function(e,t){var n=yG(t,2),r=n[0],o=n[1];return kG(kG({},e),{},jG({},r,o.scale))}),{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,i=n.length;o<i;o++){var a=n[o],s=a.props,l=a.item,c=void 0!==l.type.defaultProps?kG(kG({},l.type.defaultProps),l.props):l.props,u=_j(l.type);if("Bar"===u){var f=(s.data||[]).find((function(t){return lU(e,t)}));if(f)return{graphicalItem:a,payload:f}}else if("RadialBar"===u){var d=(s.data||[]).find((function(t){return HW(e,t)}));if(d)return{graphicalItem:a,payload:d}}else if($K(a,r)||UK(a,r)||KK(a,r)){var p=XK({graphicalItem:a,activeTooltipItem:r,itemData:c.data}),h=void 0===c.activeIndex?p:c.activeIndex;return{graphicalItem:kG(kG({},a),{},{childIndex:h}),payload:KK(a,r)?c.data[p]:a.props.data[p]}}}return null}},{key:"render",value:function(){var e=this;if(!Pj(this))return null;var t,n,r=this.props,o=r.children,i=r.className,a=r.width,s=r.height,l=r.style,c=r.compact,u=r.title,d=r.desc,p=gG(r,pG),h=Aj(p,!1);if(c)return f.createElement(XH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},f.createElement(zj,mG({},h,{width:a,height:s,title:u,desc:d}),this.renderClipPath(),Dj(o,this.renderMap)));this.props.accessibilityLayer&&(h.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,h.role=null!==(n=this.props.role)&&void 0!==n?n:"application",h.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},h.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return f.createElement(XH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},f.createElement("div",mG({className:ge("recharts-wrapper",i),style:kG({position:"relative",cursor:"default",width:a,height:s},l)},m,{ref:function(t){e.container=t}}),f.createElement(zj,mG({},h,{width:a,height:s,title:u,desc:d,style:CG}),this.renderClipPath(),Dj(o,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(f.Component);jG(p,"displayName",t),jG(p,"defaultProps",kG({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},u)),jG(p,"getDerivedStateFromProps",(function(e,t){var n=e.dataKey,r=e.data,o=e.children,i=e.width,a=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,f=t.dataEndIndex;if(void 0===t.updateId){var p=LG(e);return kG(kG(kG({},p),{},{updateId:0},d(kG(kG({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||i!==t.prevWidth||a!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!cj(c,t.prevMargin)){var h=LG(e),m={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},y=kG(kG({},IG(t,r,s)),{},{updateId:t.updateId+1}),g=kG(kG(kG({},h),m),y);return kG(kG(kG({},g),d(kG({props:e},g),t)),{},{prevDataKey:n,prevData:r,prevWidth:i,prevHeight:a,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(!Mj(o,t.prevChildren)){var v,b,x,w,_=Ej(o,Mq),S=_&&null!==(v=null===(b=_.props)||void 0===b?void 0:b.startIndex)&&void 0!==v?v:u,O=_&&null!==(x=null===(w=_.props)||void 0===w?void 0:w.endIndex)&&void 0!==x?x:f,k=S!==u||O!==f,j=Rk(r)||k?t.updateId+1:t.updateId;return kG(kG({updateId:j},d(kG(kG({props:e},t),{},{updateId:j,dataStartIndex:S,dataEndIndex:O}),t)),{},{prevChildren:o,dataStartIndex:S,dataEndIndex:O})}return null})),jG(p,"renderActiveDot",(function(e,t,n){var r;return r=(0,f.isValidElement)(e)?(0,f.cloneElement)(e,t):GS(e)?e(t):f.createElement(bU,t),f.createElement(Wj,{className:"recharts-active-dot",key:n},r)}));var h=(0,f.forwardRef)((function(e,t){return f.createElement(p,mG({},e,{ref:t}))}));return h.displayName=p.displayName,h};FG({chartName:"LineChart",GraphicalChild:mX,axisComponents:[{axisType:"xAxis",AxisComp:BX},{axisType:"yAxis",AxisComp:YX}],formatAxisMap:CH}),FG({chartName:"BarChart",GraphicalChild:_H,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:BX},{axisType:"yAxis",AxisComp:YX}],formatAxisMap:CH}),FG({chartName:"PieChart",GraphicalChild:aq,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:cK},{axisType:"radiusAxis",AxisComp:GU}],formatAxisMap:function(e,t,n,r,o){var i=e.width,a=e.height,s=e.startAngle,l=e.endAngle,c=ij(e.cx,i,i/2),u=ij(e.cy,a,a/2),f=KW(i,a,n),d=ij(e.innerRadius,f,0),p=ij(e.outerRadius,f,.8*f);return Object.keys(t).reduce((function(e,n){var i,a=t[n],f=a.domain,h=a.reversed;if(Rk(a.range))"angleAxis"===r?i=[s,l]:"radiusAxis"===r&&(i=[d,p]),h&&(i=[i[1],i[0]]);else{var m=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return WW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WW(e,t)}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i=a.range,2);s=m[0],l=m[1]}var y=_W(a,o),g=y.realScaleType,v=y.scale;v.domain(f).range(i),OW(v);var b=EW(v,BW(BW({},a),{},{realScaleType:g})),x=BW(BW(BW({},a),b),{},{range:i,radius:p,realScaleType:g,scale:v,cx:c,cy:u,innerRadius:d,outerRadius:p,startAngle:s,endAngle:l});return BW(BW({},e),{},FW({},n,x))}),{})},defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}}),FG({chartName:"AreaChart",GraphicalChild:TX,axisComponents:[{axisType:"xAxis",AxisComp:BX},{axisType:"yAxis",AxisComp:YX}],formatAxisMap:CH});const WG=f.forwardRef((({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value",fontSizeVariant:i},a)=>n.length?(0,u.jsx)("div",{ref:a,className:ve("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map((e=>(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,u.jsx)("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,u.jsx)("span",{className:"capitalize",style:{fontSize:i},children:e[o]})]},e.value)))}):null));WG.displayName="ChartLegendContent";const VG=f.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:f,nameKey:d="name",labelKey:p},h)=>{if(!e||null==t||!t.length)return null;const m=1===t.length&&"dot"!==r;return(0,u.jsxs)("div",{ref:h,className:ve("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[p]||a;return n?(0,u.jsx)("div",{className:ve("font-medium",l),children:n}):null})(),(0,u.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{const n=f||e.color||"#000";return(0,u.jsxs)("div",{className:ve("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,u.jsx)("div",{className:ve({"size-2.5":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,u.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,u.jsx)("span",{children:e[d]||e.dataKey}),(0,u.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));VG.displayName="ChartTooltipContent";const $G=f.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:f,nameKey:d="name",labelKey:p},h)=>{if(!e||null==t||!t.length)return null;const m=1===t.length&&"dot"!==r;return(0,u.jsxs)("div",{ref:h,className:ve("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[p]||a;return n?(0,u.jsx)("div",{className:ve("font-medium",l),children:n}):null})(),(0,u.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{const n=f||e.color||"#000";return(0,u.jsxs)("div",{className:ve("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,u.jsx)("div",{className:ve({"size-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,u.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,u.jsx)("span",{children:e[d]||e.dataKey}),(0,u.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));$G.displayName="ChartTooltipContent";const UG=f.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:f,nameKey:d="name",labelKey:p},h)=>{if(!e||null==t||!t.length)return null;const m=1===t.length&&"dot"!==r;return(0,u.jsxs)("div",{ref:h,className:ve("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[p]||a;return n?(0,u.jsx)("div",{className:ve("font-medium",l),children:n}):null})(),(0,u.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{var n;const o=e.color||(null==(n=e.payload)?void 0:n.fill)||f||"#000";return(0,u.jsxs)("div",{className:ve("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,u.jsx)("div",{className:ve({"h-2.5 w-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?o:"",borderColor:"dashed"===r?o:""}}),(0,u.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,u.jsx)("span",{children:e[d]||e.dataKey}),(0,u.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));UG.displayName="ChartTooltipContent";const KG=f.forwardRef((({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value"},i)=>n.length?(0,u.jsx)("div",{ref:i,className:ve("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map((e=>(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,u.jsx)("div",{className:"h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,u.jsx)("span",{className:"capitalize",children:e[o]})]},e.value)))}):null));KG.displayName="ChartLegendContent";const qG=f.forwardRef((({className:e,hideIcon:t=!1,payload:n=[],verticalAlign:r="bottom",nameKey:o="value",fontSizeVariant:i},a)=>n.length?(0,u.jsx)("div",{ref:a,className:ve("flex items-center justify-center gap-4","top"===r?"pb-3":"pt-3",e),children:n.map((e=>(0,u.jsxs)("div",{className:"flex items-center gap-1.5",children:[!t&&(0,u.jsx)("div",{className:"size-2 shrink-0 rounded-sm",style:{backgroundColor:e.color}}),(0,u.jsx)("span",{className:"capitalize",style:{fontSize:i},children:e[o]})]},e.value)))}):null));qG.displayName="ChartLegendContent";const HG=(0,f.forwardRef)((({active:e,payload:t,className:n,indicator:r,hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:l,formatter:c,color:d,nameKey:p="name",labelKey:h},m)=>{const y=(0,f.useMemo)((()=>{if(o||null==t||!t.length)return null;const[e]=t,n=s?s(a||""):e[h]||a;return n?(0,u.jsx)("div",{className:ve("font-medium",l),children:n}):null}),[a,s,t,o,l,h]);if(!e||null==t||!t.length)return null;const g=1===t.length&&"dot"!==r;return(0,u.jsxs)("div",{ref:m,className:ve("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[g?null:y,(0,u.jsx)("div",{className:"grid gap-1.5",children:t.map(((e,t)=>{const n=d||e.color||"#000";return(0,u.jsxs)("div",{className:ve("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!i&&(0,u.jsx)("div",{className:ve({"size-2.5":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,u.jsxs)("div",{className:"flex-1 flex justify-between items-center",children:[(0,u.jsx)("span",{children:e[p]||e.dataKey}),(0,u.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)}))})]})}));HG.displayName="ChartTooltipContent",(0,f.createContext)(null);const YG=(0,f.createContext)(void 0),XG=()=>{const e=(0,f.useContext)(YG);if(!e)throw new Error("Table components must be used within Table component");return e},GG=({children:e,className:t,checkboxSelection:n=!1,...r})=>{const o={checkboxSelection:n},i=f.Children.toArray(e).find((e=>f.isValidElement(e)&&e.type===nZ)),a=f.Children.toArray(e).filter((e=>f.isValidElement(e)&&e.type!==nZ));return(0,u.jsx)(YG.Provider,{value:o,children:(0,u.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,u.jsx)("div",{className:"overflow-x-auto w-full",children:(0,u.jsx)("div",{className:"relative",children:(0,u.jsx)("table",{className:ve("table-fixed min-w-full border-collapse border-spacing-0",t),...r,children:a})})}),i]})})},ZG=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:i,...a})=>{const{checkboxSelection:s}=XG();return(0,u.jsx)("thead",{className:ve("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...a,children:(0,u.jsxs)("tr",{children:[s&&(0,u.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,u.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,u.jsx)(Je,{size:"sm",checked:n,indeterminate:o,disabled:i,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},JG=({children:e,className:t,...n})=>(0,u.jsx)("th",{scope:"col",className:ve("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),QG=({children:e,className:t,...n})=>(0,u.jsx)("tbody",{className:ve("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),eZ=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...i})=>{const{checkboxSelection:a}=XG();return(0,u.jsxs)("tr",{className:ve("hover:bg-background-secondary",t&&"bg-background-secondary",r),...i,children:[a&&(0,u.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,u.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,u.jsx)(Je,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},tZ=({children:e,className:t,...n})=>(0,u.jsx)("td",{className:ve("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),nZ=({children:e,className:t,...n})=>{const{checkboxSelection:r}=XG();return(0,u.jsx)("div",{className:ve("px-3 py-3",r&&"px-4",t),...n,children:e})};GG.displayName="Table",ZG.displayName="Table.Head",JG.displayName="Table.HeadCell",QG.displayName="Table.Body",eZ.displayName="Table.Row",tZ.displayName="Table.Cell",nZ.displayName="Table.Footer",GG.Head=ZG,GG.HeadCell=JG,GG.Body=QG,GG.Row=eZ,GG.Cell=tZ,GG.Footer=nZ;const rZ=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var oZ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const iZ=(0,f.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>(0,f.createElement)("svg",{ref:l,...oZ,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:rZ("lucide",o),...s},[...a.map((([e,t])=>(0,f.createElement)(e,t))),...Array.isArray(i)?i:[i]]))),aZ=((e,t)=>{const n=(0,f.forwardRef)((({className:e,...n},r)=>{return(0,f.createElement)(iZ,{ref:r,iconNode:t,className:rZ(`lucide-${o="X",o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,e),...n});var o}));return n.displayName="X",n})(0,[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),sZ=window.wp.i18n,lZ=()=>{var e,t;const n=null!==(e=null===(t=window)||void 0===t||null===(t=t.suremailsNotice)||void 0===t?void 0:t.dashboardUrl)&&void 0!==e?e:"";return React.createElement("div",{className:"flex items-start justify-between bg-background-primary p-3 rounded-tr-lg rounded-br-lg overflow-hidden"},React.createElement("div",{className:"flex items-center justify-start gap-4"},React.createElement(c,{className:"shrink-0 size-9"}),React.createElement("div",null,React.createElement("p",{className:"p-0"},(0,sZ.__)("Your website's emails may not be delivering! Create a connection with an SMTP service to ensure reliable email delivery.","suremails")),React.createElement(Oe,{variant:"primary",size:"xs",className:"mt-2",onClick:()=>window.open(n,"_self","noopener,noreferrer")},(0,sZ.__)("Configure SureMail","suremails")))),React.createElement(Oe,{className:"p-0.5 before:hidden",size:"sm",variant:"ghost",icon:React.createElement(aZ,null),onClick:()=>{const e=document.getElementById("suremails-admin-notice");e&&e.remove()}}))};s()((()=>{const e=document.getElementById("suremails-admin-notice");e&&(0,i.createRoot)(e).render(React.createElement(lZ,null))}))})();